cancel
Showing results for 
Search instead for 
Did you mean: 

SD FATFS codes generated from CubeMX doesn't work?

Darren Chew
Associate II
Posted on January 16, 2018 at 05:39

I'd followed the link workaround and it still doesn't work

https://community.st.com/docs/DOC-1751-wa-proposal-when-using-fatfs-r012c-with-stm32cubemx

 

So I'm just curious did I setup the CubeMX correctly. Appreciate that someone help to look at my project file and comment.

4 REPLIES 4
Tobias Wedell
Associate II
Posted on January 16, 2018 at 20:21

Hi,

I think you have to add two DMA channels for SDMMC1_RX and SDMMC1_TX. I have correctedyour file. Look at the DMA section for SDMMC1.

If this doesn't help try this suggestions:

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

It is for the STM32F4 but maybe it also works for you.

Have you tried to access your SD card with

WriteBlocksand

ReadBlocks commands

?

Best regards

________________

Attachments :

STM32L496VG_SD.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy6C&d=%2Fa%2F0X0000000b4F%2FttY81hxKYe69SuS87T7GxobK3jlN_A1b8.Qh7VQtbTk&asPdf=false
Posted on January 17, 2018 at 03:55

Tks Tobias, this resolve the issue.

Regards

Posted on January 17, 2018 at 08:02

What resolves the issue? Only the changes for DMA in CubeMX or you have to do some changes at your source code?

Maybe helpful for others.

Posted on January 17, 2018 at 09:24

Changes to the DMA (RX & TX) and following the link (code changes) that you initially sent.

The STM example requires queues, but this link doesn't require.

Hope this help.