2019-08-25 11:21 PM
I am getting errror while opening of file of sd card
i have succesfully done of mounting of sd card but when i call function of f_open for opening file to write to sd card i am getting error
i have written below code for that
res = f_mount(&SDFatFs, (TCHAR const*)SDPath, 0);
if(res==0)
{
res= f_open(&MyFile, "STM32.TXT", FA_CREATE_ALWAYS | FA_WRITE);
if(res==0)
{
res = f_write(&MyFile,"hello card",10,&written);
if(res==0)
{
f_close(&MyFile);
}
}
}