Hello All, How to Rewrite the internal EEPROM of MKE02Z64VLH2, I am able to write and read but cannot erase and write again please help me,

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

Hello All, How to Rewrite the internal EEPROM of MKE02Z64VLH2, I am able to write and read but cannot erase and write again please help me,

1,091 Views
manojkhatri
Contributor I

bool Eep_F_Erase_Flash_b(LDD_TDeviceData *MyFLASH_Ptr, LDD_FLASH_TAddress Address, LDD_FLASH_TDataSize Size)
{   
     LDD_TError Error;
     // *Mem_v_OpStatus_u8 = FALSE;
      Error = EEPROM_RW_Erase(MyFLASH_Ptr, Address, Size);
      while (!DataWrittenFlg)
      {                                                   /* Wait until the data are written */
           EEPROM_RW_Main(MyFLASH_Ptr);                                                 /* Run the main method */
      }
      DataWrittenFlg = FALSE;
      if (EEPROM_RW_GetOperationStatus(MyFLASH_Ptr) == LDD_FLASH_FAILED)
      {           /* Check if the operation has successfully ended */
           return FALSE;    /* Error state solution */
      }
      else
      {
             return TRUE;
      }
 }

3 Replies

967 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Manoj Khatri,

     About the KE02 EEPROM, you can refer to our sample code from this link:

FRDM-KEXX Driver Library Package 

EEROM project can be found in folder: KEXX_DRIVERS_V1.2.1_DEVD\kexx_drv_lib\build\iar\ke02\EEPROM_demo

  Please check the official code, I have test it before, it works OK on my side.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

967 Views
mjbcswitzerland
Specialist V

Hi

See this for details about the EEPROM in the KE02: http://www.utasker.com/kinetis/KE_EEPROM.html
There are binaries at http://www.utasker.com/kinetis/FRDM-KE02Z.html and http://www.utasker.com/kinetis/FRDM-KE02Z40M.html (which should have the EEPROM interface in them).
Parameter storage document at http://www.utasker.com/docs/uTasker/uTaskerFileSystem_3.PDF

Complete code in the uTasker Open Source project on GitHub, including EEPROM emulation in the uTasker KE02 simulator.

Regards

Mark

0 Kudos
Reply

967 Views
manojkhatri
Contributor I

Hi Mark, its become really helpful for me, thank you so much

Regards

Manoj

0 Kudos
Reply