Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22200

MSP430FR2433: BAKMEM0 saving data sintaxis

$
0
0

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

 


Viewing all articles
Browse latest Browse all 22200

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>