f_utime() from ff.c seems to be volatile

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

f_utime() from ff.c seems to be volatile

963 Views
markeckerberg
Contributor I

I can set the date/time of a file with f_utime() and the function returns success, then I can read the date/time with f_stat() and I see the new date/time, then I can detach and re-attach the flash drive and f_stat() still shows the old date/time as does a PC.  Is there another step required to make it non-volatile?

0 Kudos
4 Replies

666 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Mark:

Could you please let me know your KSDK version ? how can I reproduce your issue, on a TWR-BOARD?

Regards

Daniel

0 Kudos

666 Views
markeckerberg
Contributor I

Yes, thank you.

I am using a FRDM-K22F with MCUXpresso IDE v10.0.2 and SDK_2.2_FRDM-K22F.

I am working with frdmk22f_usb_examples_usb_host_msd_fatfs_bm.

Mark

0 Kudos

666 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Mark:

Sorry I still can't  reproduce your issue on my end. I tested this demo on Frdm-K22F board.  With this demo, one file f_1.dat was created, time-stampe is 2016-1-1,  then change the timestamp to 2015-10-1, and next rename this file to f_2.dat, delete it. The console output is:

pastedImage_4.png

To reproduce your issue, I modified this demo a little, just not delete this file, then check this u-disk  and verify this file with my PC, I can see the timestamp is still 2015-10-1, it seems the time stamp has changed successfully , please see below picture.  would you please double check it?

pastedImage_2.png

Regards

Daniel

0 Kudos

666 Views
markeckerberg
Contributor I

Thank you for running this test. Your test also changes read only attributes and renames the file so I tried adding that and that seems to make the time date stick. When I remove changing the read only flag, again it doesn’t stick. Do I need to set and then remove read only every time I change the time date? For my application I only want to change the time date.

Mark

0 Kudos