AnsweredAssumed Answered

SD Command Timeout

Question asked by Jacobs.Carl.001 on Jul 27, 2012
Latest reply on Nov 22, 2012 by mueller.moritz
Just curious if any one else has issues with, or has a workaround for an issue I've been experiencing with the SDIO controller on STM32F20x devices.

I'm developing a data logging that writes data to SD card at the rate of about 2K bytes per second. I've got DMA transfer and also multi-block transfers working fine and have verified bulk transfer speeds around 6M bytes per second. 

The problem is that every once in a while (several thousand block writes) I get a command timeout. I've read a fair bit on the web about people having similar issues (typically with SD_CMD_SET_BLOCKLEN). However, if I get rid of "spurious" block length setting then the same error just moves to sequentially the next command along (typically SD_CMD_WRITE_SINGLE_BLOCK).

I guess my question is twofold:
1) Is there a known cause? Something that I could maybe detect beforehand.

2) Is there a "best sequence" to recover from this state back to normal operations?

Outcomes