Disable DMA on SD card, FIFO empty, non-zero SD FIFOCNT, DBKEND not set, SD block offset each write.
Hello,
I am having issues with using the DMA to transfer SD card data to RAM. This may have to do with my configuration settings, because the FIFO error register is automatically set when I configure the SD card DPSM (not when I enable the DMA configuring the DPSM happens after enabling the DMA in the HAL).
I get small transfers to work just fine, but larger transfers that almost fill the DMA 16 bit counter are causing issues. It seems as thought the SD card is offsetting the data being transferred after my first few transfers. This offset only happens once, and then is consistently wrong. It seems as if the destination on the SD card is correct, but it is pulling from the wrong memory address. Even though I check that the memory address that I insert into this writeblocks function is the same every time.
I should say that the DBKEND bit is being set in my smaller transfers, but not the larger transfers. My smaller transfers also don't require that I poll for the SD card status because the transfer is complete when I receive the SDMMC dataend interrupt.
All the Best,
Zach
