AnsweredAssumed Answered

CMD16 timeout on STM32F746G-Discovery

Question asked by Campbell.Aaron.001 on Feb 4, 2016
Latest reply on Feb 4, 2016 by Campbell.Aaron.001
I am running tests on an SD card plugged into my STM32F746G-Discovery board. I am using the STM32F7xx_HAL_Driver and the BSP utilities provided for the Discovery board to access the SD card.

When I use DMA for transfers to the SD card (BSP_SD_WriteBlocks_DMA()), everything works as expected and the tests pass without error. However, when I transfer in polling mode (BSP_SD_WriteBlocks()), after a few hundred I/O operations, I run into the following error: in HAL_SD_WriteBlocks(), after issuing a CMD16 (SD_CMD_SET_BLOCKLEN), I get a command timeout error (SD_CMD_RSP_TIMEOUT). If I backup and try the CMD16 again, it timeouts again (even if I try 50 times).

This problem happens on multiple SD cards. The error does not occur in the same place every time; it may be on the 420th iteration or the 460th (etc), but it does happen every time I run through the tests. Is this a hardware issue? Or a driver bug? Or possibly a configuration problem on my part?