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.

MSP430FR5994: Unable to modify persistent data stored in FRAM

Part Number: MSP430FR5994

I am using MSP430FR5994 with MSP-GCC (Not using CCS)

I want to store some parameters in the FRAM which will be updated in each cycle and the values will be changed on the FRAM

I created my variables using persistent as follows

__attribute__ ((persistent)) uint8_t fNum_T = 1;

And in the main I disable the MPU and increment the persistent variable

MPUCTL0 = MPUPW | MPUENA_0; // Write PWD to access MPU registers and disable the MPU

fNum_T++;

I expect that this variable should increase by 1 every time I turn off and on the power but I observe that the value stays the same i.e. 1.

The persistent variable is created as when I program I see 2 bytes assigned to section .persistent

However I cannot modify the variable. Do I need to change something else in the MPU? What step am I missing?

**Attention** This is a public forum