I my application I am interfacing SD card with nrf52 using FATFS file system. I am observing some weird behavior while doing this. I have two SD cards, one of 2GB sandisk and another of 8 GB Transcend. While using 2GB card all operations are happening properly like formatting card and writing to SD card. But when I am using 8 GB card and trying to format it I am unable to perform the operation. Following is my formatting function
BYTE work[_MAX_SS]; /* Work area (larger is better for processing time) */
/* Create FAT volume */
ff_result = f_mkfs("", FM_FAT32, 0, work, sizeof work);
if (ff_result != FR_OK)
printf("Unable to format Disk\r\n");
if (ff_result == FR_OK)
I am getting FR_DISK_ERROR while executing f_mkfs function. What could be the possible reason for this.
One more thing I observed is that, after formatting with SD formatter, when I am trying to write onto the card it is working properly. It means format function has some issue. But I don't know why it happening...
Do you have the same problem if you try to format as FM_EXFAT ?
Thanks for the response. I tried it now its giving FR_INVALID_PARAMETER as error from f_mkfs () function. I modified statement as follows,
ff_result = f_mkfs("", FM_EXFAT, 0, work, sizeof work);
Have you made any progress with the issue? I have not been able to reproduce the issue.