2025-01-19 11:31 PM
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??
2025-01-19 11:59 PM
Read here in forum (search sd card problem etc , my posts ...) , to see the "usual" problems and what to do.
Should solve your problem.
2025-01-20 08:16 PM
i have tried all the suggested solutions on different forums but it is still not working
2025-01-21 02:03 AM - edited 2025-01-21 09:16 AM
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 ?)
2025-01-21 02:07 AM - edited 2025-01-21 02:22 AM
@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?
2025-01-21 03:07 AM
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