cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

Anonymous
Not applicable

Hello,

I'm using a PSoC6 and Creator 4.2. I have my project doing some relatively simple EEPROM read/write functions. It reads first, then increments, and writes. Just basic stuff to test it out.

When I hit reset in the debugger, my number continues to increment. Which indicates to me that the NVM is holding its value through the reset. However if I stop debugging, and start debugging again, my number loses its value, as if NVM is no longer holding it.

Is this potentially related to Debug settings and it overwriting flash when the debugger connects? Is there a debug setting or a setting in the Em_EEPROM block that will let it program/debug without touching the Em_EEPROM area of Flash?

I cannot attach the project, but I can give you code snippets if you need them.

Thanks,

Nick

0 Likes
Reply
1 Solution
Employee

Hi Nick,

You can prevent the EEPROM area from getting programmed by following the steps below:

1. In PSoC Programmer, click on the Load from device option.

2. Uncheck the WFLASH[32K] memory area.

In doing so the PSoC Programmer skips programming of the EEPROM area and you can retain your previous data.

pastedImage_0.png

Thanks,

Vaisakh

View solution in original post

0 Likes
Reply
3 Replies
Employee

Hi Nick,

The normal "start debug" function will always program the device and this will erase the memory.

But there is also a "debug without Programming" option. This of course will only work if you didn't change your firmware.

pastedImage_2.png

You can also add "debug without programming" to your program tray:

pastedImage_0.png

pastedImage_1.png

I assume there might be also a linker or project setting to prevent this, but I am not sure about that at the moment.

kind regards,

Achim

0 Likes
Reply
Anonymous
Not applicable

That worked for saving the data between debug sessions.

Is there a way to define the areas the programmer touches so it leaves the EEPROM area alone?

0 Likes
Reply
Employee

Hi Nick,

You can prevent the EEPROM area from getting programmed by following the steps below:

1. In PSoC Programmer, click on the Load from device option.

2. Uncheck the WFLASH[32K] memory area.

In doing so the PSoC Programmer skips programming of the EEPROM area and you can retain your previous data.

pastedImage_0.png

Thanks,

Vaisakh

View solution in original post

0 Likes
Reply
Top labels