cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 - SDMMC not working

JC Lebreton
Associate II
Posted on February 13, 2018 at 13:22

Hi

I'm having quite an issue while using the FatFs on a SD card.

I configure everything on the Cube following this tutorial :

https://www.youtube.com/watch?v=kRhF44v2ezM

  

I'm kinda lost, and i would like some support or some clues to go deeper and make it work.

I'm not planning on using an SPI connection but the SDMMC proposed by CubeMx.

For now only the initialisation doesn't return errors. any other functions lead me to differents error.

I can some documents if needed 

hope some of you could help me.

thanks in advance

#stm32h7-sdmmc #stm32h7
11 REPLIES 11
Posted on June 06, 2018 at 08:41

BTW:

there is a macro in FatFS source code:

ENABLE_SD_DMA_CACHE_MAINTENANCE=1

 

Make also sure not to enable, not to use this USE_SD_TRANSCEIVER (there is a feature to talk to SD via an external chip for level and protocol translation).

Also to bear in mind: SDMMC might have the option to use this DelayBuffer (a HW block to trim timing). I guess, I have not enabled, not in place fore me, but maybe your project, config uses DelayBuffer involved in SDMMC but it is not properly set/configured.

Posted on June 06, 2018 at 08:45

My quick suggestion:

try to use only AXI SRAM (D1) for all .data, .bss (buffers, FatFS structures, variables ...).

If it still fails - check if you use caches enabled the SD DMA functions and check if the cache maintenance is enabled and done. Check also the MPU enable (e.g. set entire AXI SRAM/D1 region as 'write-through', don't use the default WBWA).