STM32F1 SDIO layout error

Ok David, first I use PLL to clock at 72 MHZ, so as you say, it’s probably something else…

It appears I fixed part of the errors by a better writing schem but the writing speed stills very slow.

My errors were especially during reading operations at 18 MHz on the Sandisk 4GB FAT32: the card randomly enters a BUSY state longer than expected, or return a timeout error very rarely.

But on another card (1GB dirty noname : FAT format), even at 2MHz, I had (sometimes, after a lot of successful multibloc and single bloc writing) the same TIMEOUT errors in multiblock writing :

SDIO_GetFlagStatus(SDIO_FLAG_DTIMEOUT)

I fixed this by using more writing temp, and changed for :

SDIO_DataInitStructure.SDIO_DataTimeOut = 0x001FFFFF;

instead of 0x000FFFFF.

Now I can write (it looks stable) with an SDIO clock at 18 MHz, on both 1 and 4 GB card, but both can’t work at 24 MHz. I now write blocs of 4096 Bytes in 15 ms (273 KB/s) which is a bit disappointing, but because of the busy random state, I can’t stabilize better than 32 KB/s continuous on both cards…

I believe I will still need advises !