The function f_open() never return when the SD card is empty.
Hello,
I have a problem of f_read in the example project FatFS_uSD_Standalone that the function has never been return when trying to read an empty SD cards.
The following Pseudocode can access sd successfully in the example project FatFS_uSD_Standalone:
f_mkfs
f_open(FA_CREATE_ALWAYS | FA_WRITE)
f_write
f_close
f_open(FA_READ)
f_read
f_close
Need to check the SD card first to see if it is empty or not:
f_open(FA_READ)
if(ok)
{
f_read
f_close
}
else
{
f_open(FA_CREATE_ALWAYS | FA_WRITE)
f_write
f_close
}
- f_open(FA_READ) never return if no file exist.
I appreciated that if you provide any suggestion regarding this issue.
Thanks,
