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

MSP430F4132 LPM3 Wake Up on Basic Timer

$
0
0

Hello,

I am working with MSP430F4132 code that has been brought over from IAR Embedded Workbench v6.40.4 to Code Composer Studio v6.1.3.00033, compiler v16.3.0.STS, and I'm struggling to get the device to wake up from LPM3 using the basic timer.

Here is the code from my main function:

BTCTL = BTHOLD | BTDIV;
IE2 |= BTIE;
_BIS_SR(GIE);

BTCNT1 = 0;
BTCNT2 = 0;
BTCTL = BT_fCLK2_DIV64 | BT_fCLK2_ACLK_DIV256;
__bis_SR_register(LPM3_bits);

And here is the code for my basic timer ISR:

#pragma vector=BASICTIMER_VECTOR
__interrupt void basicTimer(void)
{
    __bic_SR_register_on_exit(LPM3_bits);
}

Oddly enough, the ISR is called correctly when running a debug session from IAR using an MSP-FET.  However, when running a debug session from CCS using the same MSP-FET, it looks like I enter into LPM3, but then never come out.  Anything I'm missing?

Thank you.


Viewing all articles
Browse latest Browse all 21946

Trending Articles



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