Skip to main content
dbgarasiya
Senior
August 26, 2019
Question

Error in opening of file in sd card interacing using SDIO

  • August 26, 2019
  • 0 replies
  • 431 views

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);

 }

 }

 }

    This topic has been closed for replies.