Full run erase eeprom block command error

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

Full run erase eeprom block command error

464 Views
jjr_net
Contributor I

 hello:

  Development Environment :  MCU --- mc9s12g128     IDE --- codewarrior 5.9.0

  1. Erase eeprom block command code relocate to the RAM.

pastedImage_2.png

  2. datasheet description

pastedImage_1.png

    

  3. full run is error , note ILLEGAL_BP ,  why?

0 Kudos
1 Reply

328 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

It is not possible to read from EEPROM memory while a command is executing on P-Flash memory.

Please refer GN32-EEPROM-EW-CW51

S12G Examples Pack 

GN32-EEPROM-EW-CW51 is the example code made for S12GN32 device with 1KB of EEPROM.
You can see in the main the EEPROM_END  is defined as 0x0007FF. You can re-use this code on S12G128, just change the end value of EEPROM to 0x13FF.
As you can see there are EEPROM Init, Erase Verify, Erase All and Program functions that matters.


Have a great day,
Jennie Zhang

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

0 Kudos