Part Number: PROCESSOR-SDK-AM335X
Tool/software: TI-RTOS
1. How to format the SD card ?Below is my current implementation
=============================================================
FATFS_open(0U, NULL, &fatfsHandle);
FRESULT fRetval = f_mkfs("", FM_EXFAT, 0, work, sizeof work);
=============================================================
But the return value is 3 (FR_NOT_READY, /* (3) The physical drive cannot work */ )
2. To re-open the FATFS is failed.
=============================================================
FATFS_open(0U, NULL, &fatfsHandle);
….. file operation …..
FATFS_close(fatfsHandle);
FATFS_open(0U, NULL, &fatfsHandle);
fRetval = f_opendir(&dp, "/xxx");
=============================================================
Then the return value of f_opendir() is not okay.
I suspect that these two issues result from the same root-cause.
I have traced the source code, but I don’t know why the MCSD structure object’s isOpen attribute is -1 when re-open the file system.
Thank you !!
Regards,
Eten