cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO+DMA+FATFS for STM32L476RG (CubeMX 4.25.0+MCU pack 1.11.0)

Dmitry Kochubey
Associate II
Posted on May 01, 2018 at 08:23

Dear friends,

I have an issue with uSD reading and writing in DMA mode (How ever I am able to read and write data on SD card when dma template is off). I used CubeMX to configure

but it did not work for me ''out of the box''.

My CubeMX version is 4.25.0 and L4 MCU package is 1.11.0.

Could you point out what I am doing wrong in configuration or in my code or if it is CubeMX issue, could you please advice me how to solve it?

I found some topics related to SDIO and DMA configuration and tried to implement them :

https://community.st.com/0D50X00009XkVtKSAV

?

https://community.st.com/0D50X00009Xkf5gSAB

?

https://community.st.com/0D50X00009XkYIGSA3

?

Below you find screen shots with my settings and my SW4STM32 project including CubeMX file.

0690X0000060ArJQAU.png0690X0000060Aq7QAE.png

My MCU setup:

0690X0000060Aq6QAE.png0690X00000604fCQAQ.jpg

My CubeMX configuration:

1) Clock

0690X0000060AqGQAU.png

2)Clock factor

0690X0000060AmtQAE.png

3)NVIC

0690X0000060AqaQAE.png

4)DMA

0690X0000060AmUQAU.png

5)Pin configuration

0690X0000060AqQQAU.png

6)FatFS (sector size)

0690X0000060AqVQAU.png

7)DMA template enabled

#fatfs-sdio #stm32l476 #sdio-dma #sd-card #sdio+dma+fatfs #stm32l4-sdio
12 REPLIES 12
Posted on May 11, 2018 at 22:01

Dear Imen,

Thank you very much for this notification. I just update my CubeMX immediately.

I have another question. Did ST MCU application team also fix bsp_driver_sd.c / stm32l4xx_it.c, because sources generated by CubeMX did not work out of the box?

I fixed them according to suggestions of

Kirshin.Evgeny

‌ and

Vasiliev.Alexander

‌ and upload the template to GitHub.

https://github.com/uid17/uSD_DMA_RTOS_STM32l476RG_FIXED

Thank you in advance for your response.

Best regards,

Dmitry.

Posted on May 12, 2018 at 08:42

Dear Imen,

I regret to inform you that even after upgrade to CubeMX 4.25.1  PLLM is still missing in the generated code.

Best regards,

Dmitry.

Posted on May 14, 2018 at 10:52

Hi

dmitry.kochubey

,

I tested with the attached project and the PLLM is well generated, could you retest please.

If you are asked to migrate your project please do it