cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 SD CARD FATFS Example not working

andrelongo85
Associate II

Hello,

I have a system based on STM32L452 with SDCARD. I can read and write in the SD card using the HAL functions but when I try to integrate the FATFS file system I have issues with DMA when trying to read/write to the SDA card (interrupts never arrives). I can mount the SD CARD and format.

I have followed this video step by step: https://www.youtube.com/watch?v=I9KDN1o6924

If I try not t use the DMA instead I cannot even format the SD card and I get TXUNDRUN error.

I am using STM32Cube IDE 1.6.1

Thanks!

Andrea

1 REPLY 1
Imen.D
ST Employee

Hello @andrelongo85​ ,

Which version of CubeL4 MCU package are you using ?

Are you using an example from CubeL4 package ?

Can you please provide more details on your settings and DMA configuration?

Which DMA channel are you using in Read DMA and Write DMA functions? Maybe try to use same DMA channel for both directions.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen