How to preserve/retain EEPROM data through programming: PSoC6 Emulated EEPROM v2.20

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
WiFl_1166056
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

Is it possible to prevent my EEPROM data from getting erased when I reprogram the chip? 

Since the component has a specific flash area for Emulated EEPROM, I would think it would not erase it when erasing the rest of the flash, or at least make it easy to choose.

From the datasheet:

Use Emulated EEPROM
Applicable only for PSoC 6 devices. Selects if Emulated EEPROM flash area or User flash will be used for the EEPROM storage.

0 Likes
1 Solution
Bhamy
Moderator
Moderator
Moderator
100 replies posted 10 likes given 10 likes received

Hi @ZhangSteven_IFX ,

EEPROM content can be retained by setting the EEPROM section in the linker script as NOLOAD and then recompiling the application. Kindly refer the below linker script section example with NOLOAD parameter:

    .cy_em_eeprom (NOLOAD):
    {
        KEEP(*(.cy_em_eeprom))
    } > em_eeprom

 

Best regards

Bhamy Narasimha Shenoy

View solution in original post

0 Likes
3 Replies
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi,

If you are using auxillary flash or dedicated flash, the memory will not be erased after programming.

Regards

Alakananda
0 Likes
ZhangSteven_IFX
Employee
Employee
5 replies posted 10 sign-ins First question asked

Hi,

I am testing Emulated_EEPROM example in MTB2.3 with CY8CKIT-062S2-43012, auxiliary flash is used for EEPROM, the memory will not be erased after I launch programming, but the memory will be erased if I launch debug,  it seems like launching debug will erase entire flash.

If customer wants to debug the whole project code with EEPROM data, how to retain EEPROM data when debugging?

BR.

Steven

0 Likes
Bhamy
Moderator
Moderator
Moderator
100 replies posted 10 likes given 10 likes received

Hi @ZhangSteven_IFX ,

EEPROM content can be retained by setting the EEPROM section in the linker script as NOLOAD and then recompiling the application. Kindly refer the below linker script section example with NOLOAD parameter:

    .cy_em_eeprom (NOLOAD):
    {
        KEEP(*(.cy_em_eeprom))
    } > em_eeprom

 

Best regards

Bhamy Narasimha Shenoy

0 Likes