2012-07-26 05:58 PM
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?2012-08-02 12:19 AM
Hi,
Add the following lines after SD_Write function: status = SD_WaitWriteOperation(); while(SD_GetStatus() != SD_TRANSFER_OK); if (status == SD_OK) { //OK; } else { //ERROR; }2012-08-02 01:16 AM
The problem is that every once in a while (several thousand block writes) I get a command timeout.
Could it possible that the timeout happens if an actual block erase is involved ?
2012-11-21 09:44 AM
2012-11-22 08:16 AM
so i solved my problem. it was, that the card was still busy when tried to send a new command.