cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 SDMMC f_mount failing (FR_NO_FILESYSTEM) when using DMA/SDIO

Matthew Shaw
Associate II
Posted on July 16, 2018 at 17:15

The original post was too long to process during our migration. Please click on the attachment to read the original post.
2 REPLIES 2
Posted on July 16, 2018 at 17:28

Does the non-DMA version of ReadBlocks return something that isn't zeros? Is the card formatted and usable elsewhere?

If you prefill the buffer with a non-zero data pattern before the ReadBlocks call do you still see that after the call?

Is the memory being used in the 0x20000000 or 0x10000000 ranges?]

Perhaps also review HAL examples, they tend to work a lot better and consistently than the train wreckage output by CubeMX.

STM32Cube_FW_F4_V1.21.0\Projects\STM324xG_EVAL\Applications\FatFs\FatFs_uSD_RTOS

STM32Cube_FW_F4_V1.21.0\Projects\STM324x9I_EVAL\Applications\FatFs\FatFs_uSD_RTOS\Src\sd_diskio_dma_rtos.c

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
David Littell
Senior III
Posted on July 16, 2018 at 17:45

If your DMA-accessed buffers aren't in cache-inhibited memory you probably need to do some cache flushing/invalidating.  To avoid mysterious, hard-to-debug problems I'd suggest aligning the buffer used by ..._ReadBlocks_DMA() to a cache-line boundary and memcpy() to the user buffer.  'Works for me'...  😉