Part Number: MSP430FR2433
Dear TI,
I have been playing around with the MSP430FR2433 Launchpad BlinkLED project to understand better how I can save data to non-volatile FRAM memory. Note, I've been through lots of documentation and posts including SLAA628 FRAM Best Practices and have seen code examples about how to use the PERSISTENT and NOINIT pragmas etc.
I want to use the PERSISTENT pragma with the LOCATION pragma to store some 1 time initialized data (at program time) in the information memory space. Documentation does not explicitly state this can be done but it's close to working. I've notice that the linker does put the variable at the right location, and it is initialized as expected, BUT I don't seem to be able to update it. When I put the variable in with the program memory things work as expected. Maybe I need to do something more with the SYSCFG0 register to update information memory?
#pragma PERSISTENT(testVar)
#pragma location=0x1800 // If I comment this out, then things work as expected except the variable is not in the information memory segment where I want it.
unsigned long testVar = 0x5544;
SYSCFG0 = FRWPPW | DFWP; // Program FRAM write enable
testVar++; // Record the port event in FRAM
SYSCFG0 = FRWPPW | PFWP | DFWP; // Program FRAM write protected (not writable)
Thanks,
Brett