EEPROM memory getting set to default data i.e. FF after Re-download / power reset , data written on EEPROM not getting set.

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

EEPROM memory getting set to default data i.e. FF after Re-download / power reset , data written on EEPROM not getting set.

Contributor II

I am working with MagniV MTRCKTSBNZVM128 BLDC sensorless kit, (MCU part no S912ZVML12 MKH). My requirement is to program EEPROM memory. I am able to program the EEPROM sector but after Power reset or when code is flashed again, EEPROM is set to default data i.e. FF.


From Pic 1 you can see that 06, 07, 08 and 09 is written but when I downloaded the code next time EEPROM get sets to FF (see Pic 2).


I want to see the updated data on EEPROM even after re-downloading or power reset. 


Please let me know possible reasons and solution for this.

Labels (1)
0 Kudos
1 Reply

NXP Employee
NXP Employee

Hi Rajkumar,

When you load code into MCU by default debug session, the Standard Download is performed.

The Standard Download erases whole Flash and EEPROM and programs it again. However, it seems that Standard Download does not work correctly with internal EEPROM. It does not load EEPROM data.


As a workaround, you may use Flash Programmer and Tasks.


Please start Flash Programmer (Blue lightning icon)

Run Flash Programmer.png

Please select already created Connection with Flash Configuration file and choose S-Record or ELF file as File to Flash. You may save this configuration as Target Task by adding your own task name and click on “Erase and Program” button:

Flash File To Target.png

If you save this task, it will ask you whether you want to save this task only to the framework or also on your disk.

Save a task.png

After that, it will start with Flash/EEPROM loading.


The Tasks may be configured by Target Tasks window (menu-Window-Show View-Target Tasks). You may open your task by double clicking on it and configure the device (Flash/EEPROM) and actions…
So, you may, for example, remove EEPROM device and “Erase and Program” action on EEPROM range.

This way you may load just Flash data without touching EEPROM.

Note: Optionally you may open created *.ttf file in CW (menu-File-Open File-…) and modify this task according to your needs – like enabling, add or remove actions, modify address ranges, apply address offsets, …


The currently executed Tasks may be configured in your debug configuration - go to Debugger tab and Download sub-tab.

There you may check out “Perform Standard Download” and check “Execute Tasks”.

When you click on “Add …” button, you may add your target task.

Add target task.png

Debug Configuration - task.png


With that configuration, you may load Flash/EEPROM data standard way – through Debug button and select whether you want to download Flash or EEPROM or both together.

Attached is simple example project.

I hope it helps you.

Have a great day,

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

0 Kudos