My hardware runs on battery so power is always available and I have written program on mikroc for PIC32 v3.6.1., MCU is PIC32MX170F256B
I use four unsigned long variables to store counter data while device is in sleep. Sometimes during maintence operator needs to reset MCU via MCLR to wake it up.
After upgrading compiler to V4.0.0. RAM variables are cleared to 0.
Is there a way to keep RAM state after software(SWRST) or MCLR reset events on mikroc pro for PIC32 V4.0.0.
so short code is like this..
Code: Select all
unsigned long counter1 absolute 0xA0000000;
void main(){
counter1++;
asm wait;
}
B.r.,
Marjan