S12ZVC EEPROM Problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S12ZVC EEPROM Problem

跳至解决方案
2,289 次查看
ertugby
Contributor I

Hello Support Team,

I'm programming NXP (Devkit S12ZVC) for the first time and i have eeprom and flash problem. I could write any data to EEPROM or FLASH (I checked on CW memory monitoring) and i could also read. But the data disappears every time (all eeprom bytes are 0xFF) when i reset the MCU or i power off and power on again. So i tried to write to FLASH, but I had the same problem with FLASH too. I used Processor Expert and another library too, but the problem still continues. I think i have a simple problem but i dont know that what i dont do or do wrong. I'm waiting for your helps.

Thanks from now,

Ertuğ Bayram YÜRÜK

标签 (1)
0 项奖励
回复
1 解答
2,168 次查看
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Thank you for your details.

If you want to check/ debug the data in flash memory after reset you can use the Attach option in Debug session type in debug configuration.

Attach option assumes that code is already running on the board and therefore does not run a target initialization file.

pastedImage_1.png

Every time you run/debug with Download session type the new code is downloaded into MCU, so, the flash is erased and a new project is loaded into MCU. So, you lost the stored data by the previous project.

 

If it is not clear, please, let me know.

Best regards,

Diana

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,168 次查看
ertugby
Contributor I

Thank you Ms Diana, "Attach" mode solved my problem when I am working with debugging. But I always have to download the codes, so I tried the "Custom" mode and unchecked the "execute reset sequence" and "execute startup scripts" options. And it fixed :smileyhappy: Thanks again.

Best regards,

Ertuğ

0 项奖励
回复
2,168 次查看
ertugby
Contributor I

Hello Ms Diana,

Firstly thanks your answer. I tried simple eeprom and flash projects (ZVL32-Eeprom-CW106 and ZVL32-Flash-CW106) that you suggest but the result has not changed. The data disappears again. By the way I tried the projects with 2 different S12ZVC Devkit  however I had the same problem. I am reading 0xFF when I ignore codes of erasing and writing. 

2020-03-31_13-41-33.png

2020-03-31_13-41-51.png

2020-03-31_13-48-21.png

I look forward to your help.

Best regards,

Ertuğ Bayram YÜRÜK

0 项奖励
回复
2,169 次查看
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Thank you for your details.

If you want to check/ debug the data in flash memory after reset you can use the Attach option in Debug session type in debug configuration.

Attach option assumes that code is already running on the board and therefore does not run a target initialization file.

pastedImage_1.png

Every time you run/debug with Download session type the new code is downloaded into MCU, so, the flash is erased and a new project is loaded into MCU. So, you lost the stored data by the previous project.

 

If it is not clear, please, let me know.

Best regards,

Diana

0 项奖励
回复
2,168 次查看
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

Which flash address do you use?

Could you try a simple flash example without PE to verify that the issue is not in SW? see attachment

Also, can you share the screen from the debug configuration? 

pastedImage_1.png

Thank you.

Best regards,

Diana

0 项奖励
回复