Trying to code Hourmeter.
I need help I am trying to store the data RTC clock hour data in EEPROM but struggling to read the data.
I am using RTC Task per sec and trying to record it trigger of every hour. I am able to display the seconds and hour data on run time.
But I am failing to store the data so Hourmeter data is getting reset at every power up.
I am using similar code as below sample code from EEPROM DEMO (FRDM-KE02Z40M\KEXX_DRIVERS_V1.2.1_DEVD) PAckage.
Please can someone help me to how to read the EEPROM and is wirting to EEPROM is correct way implemented
/* Erase 99th sector */
EEPROM_EraseSector( i*2 + EEPROM_START_ADDRESS);
u8DataBuff[i] = (uint8_t)i;
/* write data to erased sector */
EEPROM_Program( EEPROM_START_ADDRESS,&u8DataBuff,256 );