Skip to main content
Associate III
August 21, 2024
Question

STM32CubeIDE official example: FATFS + 16/32GB SD card returns FR_NOT_READY

  • August 21, 2024
  • 1 reply
  • 722 views

Hi, 
I pull out the official example from IDE, and do a debug run. 
I found out that the initialization always return FR_NOT_READY , after running to this line
res = f_mkfs((TCHAR const*)SDPath, FM_ANY, 0, workBuffer, sizeof(workBuffer));
- inside this line, it goes to ff.c and reaches the following lines:

/* Check physical drive status */

stat = disk_initialize(pdrv);

if (stat & STA_NOINIT) return FR_NOT_READY;

and STAT is always = 1 (failed)


This example was taken from IDE's EXAMPLE SELECTOR, should be official, and bug-free.
Anyone has any clue what to do when  FR_NOT_READY is faced?
It is not cards problem, my 2 cards works normal on PC, and formatted with 4096 size, the max of STM's FATFS can handle.

WaiSiang_0-1724216474509.png

 

 

1 reply

Wai SiangAuthor
Associate III
August 21, 2024

I get it worked with 1B (1bit). 

Why 4B cannot use? is there a IDE bug inside?