AnsweredAssumed Answered

Specific SD card returning error with FatFS

Question asked by limaye.pushkar.001 on Apr 1, 2017
Latest reply on May 9, 2018 by Daniel Koster

I am trying to read and write to a class 10 - 2GB SD card from STM32 with the help of FATFS R0.11, but f_mount() function is returning FR_NO_FILESYSTEM error code. I have tested the same code on a class 4 - 2GB and class 10 - 16GB SD card, and it worked perfectly. What am I doing wrong here for this specific SD card?


FIL filTest;FATFS fs; FRESULT initSD(){     disk_initialize(0);    FRESULT res;     res = f_mount(&fs, "", 1);     if(res != FR_OK)    {         return res;     }     res = f_open(&filTest, "test.txt", FA_OPEN_ALWAYS | FA_WRITE | FA_READ);    return res;}