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?
Hi Mark:
Could you please let me know your KSDK version ? how can I reproduce your issue, on a TWR-BOARD?
Regards
Daniel
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:
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?
Regards
Daniel
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