cancel
Showing results for 
Search instead for 
Did you mean: 

f_open returns FR_OK but doesn't create a file

WellLeithed
Associate II

I'm simply trying to do:

res = f_open(&fil, "file.txt", FA_CREATE_ALWAYS | FA_WRITE);

but nothing is created despite the return message. Could it be my SD card? I'm able to read from it in 4B mode.

Any suggestions would be gratefully received.

10 REPLIES 10
WellLeithed
Associate II

It turns out that it was as simple as enabling hardware flow control in the MX. I had been unable to get it to mount without the clock divider being 4, but I imagined that may have been creating timing issues as I see the recommended value is 0. May this have caused underrun issues that hardware flow control can prevent?

Thanks for all your willingness to help.