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
Solved! Go to Solution.
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.
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
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ğ
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.
I look forward to your help.
Best regards,
Ertuğ Bayram YÜRÜK
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.
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