hello:
Development Environment : MCU --- mc9s12g128 IDE --- codewarrior 5.9.0
1. Erase eeprom block command code relocate to the RAM.
2. datasheet description
3. full run is error , note ILLEGAL_BP , why?
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
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!
-----------------------------------------------------------------------------------------------------------------------