cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L452 DMA + SDIO Overrun Issue

Jonny
Associate III

Hi Guys,

I'm currently using an STM32L452 device and i'm having some problems with the SDIO when using it with DMA.

I have configured DMA and SDIO usign the file generated from STM32Cube tool.

When I try to read the SD card without using DMA , everything works fine.

With the DMA I keep having the RX_OVERRUN error that basically aborts all the DMA interrupts events and then the function remain stucked .

I have searched everywhere for a solution and tryed to apply all of them but i still have the same issue.

Do you know if this is a well known problem and if there is a solution ?

7 REPLIES 7

I think it is generally accepted that the CubeMX SDIO/SDMMC code output has issues, the forum is full of complaints.

Is this a NUCLEO board, or something custom? For custom report pins used for UART output, HSE clock frequency, etc.

Pretty sure I've had DMA working across all L4/L4+ parts.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Jfava
Associate

Hi Clive,

After few attempts I figured out that the DMA works if I enable just one of them ...for example I tried enabling it for RX without configuring the DMA channel for TX...and i can receive the data correctly.

If i try to enable both of them (TX and RX) i have the Overrun issue...

i would like to manage both operations with DMA sincerly..

It only ever does one direction at a time. Check how the HAL callbacks are being dispatched. Review HAL example codes for the DISCO/EVAL boards, these tend to have been tested better.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Amish.1
Associate II

hey Guys,

Need your help. I am also facing the same problem. Please Help me.

Help you how? You've provided no information about your specific situation, and I doubt you have the same custom board.

The SDIO/SDMMC peripheral, or more specifically the cards, have zero tolerance for you wandering off mid task. Are you using an RTOS?

#MeToo

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..