Got FR_INT_ERR when running f_read() in Project FatFS_uSD_Standalone
Hello,
I am using NUCLEO-H743ZI2 and running the project FatFS_uSD_Standalone with AdaFruit microSD. The TFT_ShieldDetect() is commented out because there is no LCD. The STM32.txt is successfully created and the text is successfully written into the file and read back.
I would like to read the existing text file STM32.txt. I modified the code for this purpose:
- f_mkfs() is commented out since I don't want the contain to be erased. Then run the following code:
if(f_mount(&SDFatFs, (TCHAR const*)SDPath, 0) == FR_OK)
{
HAL_Delay(1);
res = f_open(&MyFile, "STM32.TXT", FA_OPEN_EXISTING | FA_READ);
if(res == FR_OK)
{
res = f_read(&MyFile, rtext, sizeof(rtext), (void *)&bytesread);
f_close(&MyFile);
}
}
The error FR_INT_ERR is returned from f_read(). How can I read the content of an existing file?
Thanks,
