Question
STM32F103ZG SDIO and DMA
Posted on February 04, 2012 at 22:35
Hi,
I managed to read an SD-Card on the MCBSTM32EXL board in SD-Mode (not SPI-Mode) by developing my own driver. But writing does not succeed. If I exchange the FIFO address by a variable then afterwards this variable contains the last buffer value to be send. Checking the SDIO->DCOUNT register shows 0x200 before and 0x000 after the write operation. So this seems okay but on my oscilloscoop I do not see any data on the D0 signal. If I disable the DMA and execute a manual write to the FIFO then data is transmitted. With reading I discovered that SDIO->DCTRL DTDIR must be defined prior to DBLOCKSIZE otherwise no data is read. I use SDIO blocksize of 512 and DMA DMA2_Channel4->CNDT set to 128. I read the errata sheet as there are some issues with the SDIO but not the one I encountered. Who can help me out, Thanks Henk