Tool/software:
I have a firmware system using a MSP432E401 device using FreeRtos and using the SDFatFS driver provided as part of the TI driver or Third party.
I have an SD card attached to one of the SPI ports, and everything is working great. I can write and read files without any issues.
My problem is that the date stamp is wrong when a file is created. I do see the correct UNIX time when opening the file, but the file creation date does not show the corresponding date when looking at the created file.
I have set the Unix time below.
SDFatFS_Handle sdHandle =NULL;
// add_device() should be called once and is used for all media types
add_device(fatfsPrefix_2, _MSA, ffcio_open, ffcio_close, ffcio_read,
ffcio_write, ffcio_lseek, ffcio_unlink, ffcio_rename);
// Initialize real-time clock */
clock_settime(CLOCK_REALTIME, &ts);
// mount SD card
sdHandle = mOpenSdCardHandle();
I have tested on the TI provided examples, in which the Unix time is preset, and even in the example, the date is not correct. I also noted that no matter what you put month of December is not recorded as a file creation date at all.
Two fatFs examples are provided by TI: one without rtos and the other using FreeRtos. You can test the issue in any one of the two examples.
I want to note that in the hibernation module, I am not using the calendar mode of operation of the RTC.
Any help is appreciated.