problem with fatfs

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by eplant_lab on Mon Sep 28 07:41:00 MST 2015
Hi all,
I have this problem:
after divide physical drive with f_fdisk, and mounting two partitions apparentely
without problems ( I get FR_OK as result value for every used fs function), I create a file

static  FIL fil;

rc = f_open(&fil, "0:myfile.bin", FA_WRITE | FA_CREATE_ALWAYS);   ( rc =FR_OK)
rc = f_write(&fil,"abcdefg",7,&nwritten);                                                   ( rc =FR_OK)
rc = f_close(&fil);                                                                                    ( rc =FR_OK)

now, when I check

rc = f_stat("0:myfile.bin", &fno);

I get rc = FR_NO_FILE.

Any suggestions?   :~