EEPROM memory getting set to default data

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

EEPROM memory getting set to default data

913 Views
rajkumarwadhwan
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).

 

166640_166640.jpgPic_1.jpg

 

166641_166641.jpgPic_2.jpg

 

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)
3 Replies

720 Views
tiberiusvanca
Contributor II

Hi there,

have you tried to specifie a "preserve memory area" in your RUN/DEBUG configuration?

Go to: Run -> Run Configurations -> Target settings: Edit -> Connection: Advanced Programming Options

(See attachet pictures for a hint)

There specify the address range of your eeprom. I did this in example for an s12zmvc128. For your target CPU it might differ, so check the manual.

Why your eeprom gets reset after a Reset i have no idea, may be some init routine or some fault correction if you use an automated CRC in your project. Maybe try the preserve memory are and see what happens next.

Hope it helps

Kind Regards

Clemens

Run_config.jpg

target_settings.jpg

advanced_options.jpg

720 Views
rajkumarwadhwan
Contributor II

Hi Clemens,

Thank you very much, issue is resolved.

Able to write and save the previous data on eeprom :smileyhappy:

Thanks,

Rajkumar

0 Kudos

720 Views
rajkumarwadhwan
Contributor II

Hi Clemens,

Yes preserving the memory works, Thanks a lot for your solution. I can see the last written data even if I re download the code.

But now issue is with Power reset. After power reset EEPROM sets to 00. Find below snaps for your reference.

1.jpg

2.jpg

Please let us know the possible causes and solution.

0 Kudos