Part Number:MSP430FR2433
if(P1IFG & BIT3) { Counter2 = *(unsigned int *)BAKMEM2; Counter2++; *(unsigned int *)BAKMEM2=Counter2; }
Basically, I want to count how many times I pressed the buttons and keep the count
I am putting my device to sleep with the following code
P1IFG=0; PMMCTL0_L |= PMMREGOFF; // and set PMMREGOFF __bis_SR_register(LPM3_bits |GIE); __no_operation();
It does wake up and goes into the IF statement when click the button. but for some reason is not keeping the count after each time I click.
just wondering if I have the correct syntax because is not working on my launchpad