This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Retaining data after reprogramming the device from persistent FRAM portion (msp430fr6922)

HI all,

Micro-controller --MSP430FR6922

COMPILER-- code compressor studio

I wanted to know that , if there is any provision to retain the data stored in the "#pragma PERSISTENT variable"  ,after reprogramming the same microcontroller  using MPU (memory protection unit).?? Or any how i could retain the data after programming.

Thanking you.
Sayan

  • Sayan Maji said:
    I wanted to know that , if there is any provision to retain the data stored in the "#pragma PERSISTENT variable"  ,after reprogramming the same microcontroller  using MPU (memory protection unit).?

    The Erase Options in the CCS project properties controls how CCS erase the device memory during programming.

    For a new project the default is "Erase main memory only".

    Try setting Erase Options to "Replace written memory locations, retain unwritten locations" in order to retain the data in the persistent variable after reprogramming. For this to work the persistent variable must also be marked as NOINIT, so that the variable is not written to during programming. 

**Attention** This is a public forum