cancel
Showing results for 
Search instead for 
Did you mean: 

How to Configure FATFS for SDMMC ?

Charlie CHEN
Associate III

Hi ,

I`m trying to build a project with STM32CubeMX and use FATFS for SDMMC ,then print it with UART on screen.

Here is the configuration on CubeMX.

(If I configured wrong way,then you can tell me! I`ll appreciate that)

0690X000009ZgHvQAK.png

0690X000009ZgI5QAK.png0690X000009ZgI0QAK.png

0690X000009ZgIFQA0.png

0690X000009ZgIKQA0.png

I have built it for many times, but when I ran on my development board, it could`t open directory root and came out error like FR_DISK_ERR.

I have checked my card and it work well,so I exclude the problem.

​I want to figure out that I configure it wrong way or not.

Hope anyone can help!

Really Appreciate !!

5 REPLIES 5
xxxmatrixxx
Associate II
xxxmatrixxx
Associate II

in the option FATFS -> PLATFORM SETTINGS do not forget to set the input pin, which is responsible for the installed memory card, otherwise the initialization will fail (0 - there is a memory card, 1 - no)

Hi @RP.2etrov​ ,

Thanks for your reply!

You mean Detect Pin right?

I have set it already.

I just view the website you provide,it seems a little bit different with mine,but still Appreciate.

I`m wondering if there any example or method can give me some advises.

Really Grateful!!

xxxmatrixxx
Associate II

>> You mean Detect Pin right?

Yes

>> I just view the website you provide,it seems a little bit different with mine,but still Appreciate.

>> I`m wondering if there any example or method can give me some advises.

CUBE MX generates the wrong code for processing the interrupt for transferring data to the SD card, I didn’t get write to the file and closed it because of this, the transfer handler just didn’t get called, for some reason, I don’t know, I didn’t dig further

in this example, everything is well described, which is attached to the topic that I threw you, she helped me

Sure ! It looks plentiful knowledge,I think I should to digest for a while.

But it`s a great topic for me!

Thanks for a lot!