AnsweredAssumed Answered

How to read and write EEPROM KE02Z64 or FRDMKE02

Question asked by Arti D on Jul 15, 2015
Latest reply on Jul 19, 2015 by Kerry Zhou



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 */

    for( i=0;i<128;i++)


        EEPROM_EraseSector( i*2 + EEPROM_START_ADDRESS);





        u8DataBuff[i] = (uint8_t)i;



    /* write data to erased sector */

    EEPROM_Program( EEPROM_START_ADDRESS,&u8DataBuff[0],256 );