AnsweredAssumed Answered

Need help configuring DMA FIFO's for SDIO Operation

Question asked by Rob on Feb 6, 2015
Latest reply on Feb 16, 2015 by Clive One
Hello all,
I am trying to write a block of data from memory to a SDHC card through the DMA interface.

The hardware I'm using is a STM32F401 Discovery board. I've hooked my own SD card connector to the proper pins. I can write to the SD card succesfully in 1Bit mode when the DMA controller is not involved.

I am using STM32CubeMX for driver configuration.

I am using STM32Cube FW ver 1.4.0

I have updated the "sd_diskio.c" file to call the function BSP_SD_WriteBlocks_DMA() whenever a SD_write() is called.

The SD_WriteBlocks_DMA() function executes with no errors. But the program hangs when HAL_SD_CheckWriteOperation() is called.

The data I am trying to write to the SDIO interface is stored in a 128 element array of 32 bit integers. I pass this data in a f_write() call because I'm using FatFS.

I'm considering the problem could be coming from the way I configure the DMA FIFO's. Again, I'm transfering 32 bit values to the 32 bit SDIO interface. See the screenshot below for how I have the SDIO DMA configured.

Unfortunately I don't have a really good understanding of beats and bursts on the memory and peripheral side, and how they relate to the state of the FIFO. If someone could help me out here I'd be appreciative.