2023-01-20 12:49 AM
HI All,
I have created a project to integrate sd card with STM32G474RE nucleo board while using SPI interface. After running the project I am able to initialize the sd card properly but while mounting the sd card, I am getting one error like: "FR_DISK_ERR".
I am usung STMCubeide to do the configuration and followed some tutorial to setup my fatfs library.
I am attatching my project here for the reference.
Please have a look on it and help me rectify the issue.
Solved! Go to Solution.
2023-01-20 08:10 AM
Hello @kaush ,
First, you can increase the heap and stack minimum size in the linker settings?
Second, why using maximum sector size MAX_SS =4096 since it is recommended to use 512 for memory card.
Finally, in order to register the file system to FatFS, you may refer to the example proposed in Github. Then you can check if you can read after every write.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-01-20 02:54 AM
Hello @kaush ,
Have a look at the available example :
\Repository\STM32Cube_FW_G4_V1.5.1\Projects\NUCLEOG474RE\Applications\FatFs\FatFs_uSD_Standalone
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-01-20 08:10 AM
Hello @kaush ,
First, you can increase the heap and stack minimum size in the linker settings?
Second, why using maximum sector size MAX_SS =4096 since it is recommended to use 512 for memory card.
Finally, in order to register the file system to FatFS, you may refer to the example proposed in Github. Then you can check if you can read after every write.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-01-22 09:40 PM
I have gone through the example project. I am using SPI instead of SDIO for my project but I followed the same process:
1) MX_FATFS_Init
2) SD card initialization
3) f_mount
and I am facing issue in the last step and getting error FR_DISK_ERR
2023-01-22 10:46 PM
@F.Belaid ,
Thanks for the suggestions. I am able to perform read and write operations properly.
To be more precise changing "MAX_SS =512" worked for me and other changes are good to have for executing application in efficient way.
2024-01-05 03:34 AM
Could you plz provide the final working project.
When i run your project, it give this error "...multiple definition of `hspi1'..", any suggestion? Thank you.