cancel
Showing results for 
Search instead for 
Did you mean: 

SD Card mounting error- FR_DISK_ERR, disk error occurred

KhushJain
Associate II

I am using STM32L562 microcontroller. I am unable to interface it with sdcard using sdmmc and fatfs
my sd cards are- 8gb (formatted in fat32)[old], 32gb(unused)[new]. In both sd cards I am getting the same problem- disk error occurred (FR_DISK_ERR) it means disk is not initialized properly but I have checked the hardware and it has no problem, what should I do??

5 REPLIES 5
AScha.3
Chief III

Read here in forum (search sd card problem etc , my posts ...) , to see the "usual" problems and what to do.

Should solve your problem.

If you feel a post has answered your question, please click "Accept as Solution".

i have tried all the suggested solutions on different forums but it is still not working

 

So:

- whats your setup (in Cube) now for sdmmc  ? (show screens)

- How is your hardware now ? (What you tried/changed)?

- What you do in your software and which error you at which point? (what you tried else, to find out, why ?)

If you feel a post has answered your question, please click "Accept as Solution".

@KhushJain wrote:

I am getting the same problem- disk error occurred (FR_DISK_ERR) 


So have you stepped through the code to find exactly what is causing that error to be returned?

Have you used an oscilloscope and/or logic analyser to see what the hardware is actually doing?

 


@KhushJain wrote:

 I have checked the hardware and it has no problem, what should I do??


Post full hardware details for others to review?

Does a standard ST example on an ST board work?

 

PS:

What SD Card driver/middleware are you using?

Failure tends to cascade. Instrument the sector IO, see which succeeds or fails and the point at which that gets reported at the top level. Usually a lot later.

Debug based on an understanding of what's actually failing

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