2012-11-22 08:33 AM
Sometimes, when writing single blocks to the SD-Card, the TX FIFO underruns and generates an error. If this happens I want to write the block again immediately. Before the block is written, I do a CMD16 command (SD_CMD_SET_BLOCKLEN). But this fails with a SD_CMD_RSP_TIMEOUT.
The SD_D0 line is HIGH, when the command is sent. So I assume the card is not busy.I suppose that the command state machine is in an unknown state after the fifo underrun occurs.Does anybody ever had this problem before or has some ideas how to solve this?Regards Moritz #stm32-sdio-dma-fifo