2023-07-06 09:34 PM - last edited on 2024-11-04 03:09 AM by Andrew Neil
Does anyone meet this problem?
I use Stm32Cubex to do a freertos & sdcard with sdmmc, it work good,
but it has a problem, it the board power on first and not press reset button.
the first f_open will return FR_NOT_READY and the f_mount is FR_OK. then any fatfs api will not work, all return FR_DISK_ERROR.
but if i power on the board and press reset button, it work.
2023-07-07 02:06 AM
Hello @HuangYungChuan
First let me thank you for posting.
One possible solution is to add a delay after the system starts up before attempting to access the SD card. This will give the SD card time to fully initialize before attempting to access it.
You can use the vTaskDelay() function provided by FreeRTOS. This function suspends the current task for a specified period of time, allowing other tasks to run in the meantime.
Thx
Ghofrane