Skip to main content
Visitor II
February 28, 2022
Question

STM32H745I-DISCO FatFs_Shared_Device example doesn't work.

  • February 28, 2022
  • 2 replies
  • 1948 views

Example builds, but serial terminal reads:

[CM7]:	Creating FileSystem...
[CM7]:	Creating FileSystem Failed!...
[CM7]:	Error!! 

Is there an example of eMMC fatfs that works?

    This topic has been closed for replies.

    2 replies

    Graduate II
    February 28, 2022

    Built stuff for these boards that does work, output via ST-LINK VCP at 115200 8N1

    Not sure I'd start with both CM4 and CM7 cores running the eMMC. Depending on compiler polling will probably fail at around 30-33 MBps in 8-bit mode. Would definitely want to be using DMA.

    https://github.com/cturvey/RandomNinjaChef/blob/main/STM32H745I_DISCO_eMMC/H745I_DISCO_8BIT_DDR.hex

    woozlAuthor
    Visitor II
    February 28, 2022

    Hey, thanks for all your help on the forum, I've seen your name quite a few times, your posts are always super useful as I'm pretty new to embedded development.

    The link you posted contains the hex file. Do you have the source files available? Thanks!

    Graduate II
    February 28, 2022

    Yes, it tends to save support costs on getting the compiler/tools working, and reducing the number of reasons why it doesn't work in any given scenario.

    Figure most of the things I work on tend to have already involved many man-days of work/analysis.

    Visitor II
    February 28, 2022

    Hello @woozl​ ,

    Try to increase the stack size from 0x400 to 0x800 in the icf/ld file.

    Please let me know if this solves your problem.

    BeST Regards,

    Walid

    Visitor II
    February 28, 2022

    I'm having the same issue @woozl​ . I've set the stack size on both cores to 0x800 and have the same error. Through the debugger, I've traced the issue back to line 948 of the stm32h7xx_hal_mmc.c file. The error code for the hmmc struct is "HAL_MMC_ERROR_TX_UNDERRUN". Anywhere to look for info on that?

    Graduate II
    February 28, 2022

    POLLED mode is failed..

    Try reducing clocking speed, or bandwidth via 4-bit mode

    There might be dumber code deeper in the driver that auto-senses and picks it's own numbers. Could perhaps drop the PLL clock the unit is using..