cancel
Showing results for 
Search instead for 
Did you mean: 

How to get DMA working for the last DWORDs from SDMMCx FIFO?

JHYBN.2056
Associate II

Hello,

I am working on SDMMC ReadBlock function using DMA with peripheral flow control enabled. When I try to transfer 512 Bytes block from the SD Card, I have last 3 DWORDs "mising" (CNDTR is 0xFF82 instead of expected 0xFF00). These DWORDs are transfered by DPSM (its DCOUNT is zero), but staying in FIFO, not transfered by DMA. So I have to transfer them by SW, instead by DMA.

Is there anyone, who knows how to persuade DMA to completely finish the transfer?

Some details about my setup:

  • memory buffer is 32 Bytes aligned
  • DMA burst transfer is INCR4 on both sides
  • SDMMC hardware flow enabled
  • transfer is finished with DATAEND flag

Thank you for any help,

Jarda

1 REPLY 1
JHYBN.2056
Associate II

If somebody is interested in ...

My DMA problem has been solved after I set-up FIFO threshold level inside DMA_SxCR register to b'11 (full FIFO). From that moment all transfers are finished automatically. It's a pitty, that I do not get this idea from manual, but I have to follow the USB-FS MSC application example...

Jarda