Hi. I need to keep the value of some RAM variables after a power loss. I obviously have to use a back-up battery. But I have a doubt. Please consider the following example code:
int a; <-- global variable
a = 10;
Suppose that power goes down and a = 10. What happens after the new power-on with the declaratione int a? Is the variable "a" redeclared? Would its value be lost?
I'm using the MCF52259DEMOKIT; VSTBY pin is connected to 3.3V but after a reset my variable goes to "0" after it is redeclared.