Hello Jonathan,
Thank you very much for your help, I made one small step forward.
Here is a sample of the code I am using:
int32_t iFileHandle;
const uint8_t uHandle[]= "A:/recordings/FM/Test.txt";
iFileHandle=Fopen((uint8_t *)uHandle,"w+");
if(iFileHandle >0)
{
DEBUG_15 = 1;
}
else
{
DEBUG_15 = 2;
}
The values for DEBUG_15 is 2 and iFileHandle has the value 0xF0305014 meaning ERROR_OS_FILESYSTEM_INVALID_DIR_PATH.
This code runs ~300 ms after power-on from a function called at the end of UI_Init(). I do not know if any other initializations have to be made before fopen is called (maybe in order to initialize the NAND module) …
The same results were noticed with and without the file in recordings/FM/Test.txt. Fopen was called with “r” and “w+” with same result.
One more thing related to the initialization sequence: the function IsExternalDriveFsReady returns 0 meaning that “an external media and its drive are not present”.
I see that in my project the FSDriveInit function is called only in the file updater\src\updater_live.c that I think updates the firmware.
When I call FSDriveInit(0); the following error number is retuned:
0xF0208000 meaning ERROR_DDI_LDL_GENERAL.
Does anybody know the reason for this error?
Thank you very much for your help,
Ioan Harna