Skip to main content
Visitor II
February 22, 2021
Question

SDCARD +DMA Writing issue

  • February 22, 2021
  • 1 reply
  • 718 views

Hi

I have setup SDMMC1 over DMA2 channel 14 (Tx) and having issue in writing more frequent data. I have interrupt on system tick (pend sv) 1ms. When I write every 10ms 128 Bytes, it gives me ring buffer overflow error. That means it stuck somewhere on f_write and not returning from there.

I have found that it gives timeout on

HAL_DMA_PollForTransfer(&SDMA__stDMA_Copy_handle, HAL_DMA_FULL_TRANSFER, 1000) function after starting DMA transfer.

Is it related to FATFS or DMA ?

Is there any workaround to write more frequent large data with current configuration.

I have set DMA interrupt priority as 6 and SDMMC1 as 5.

Any help would be appreciated.

    This topic has been closed for replies.

    1 reply

    Visitor II
    March 30, 2021

    Hello, sometimes sdcard needs a lot of time for writing. Try to increase the time beetween writing (like 500ms) for testing. Also, you can try increasing your buffer size.