Hi,
I'm using a LaunchPad with MSP430G2231 and programming with CCS.
I want my probramm to sleep in LPM3 most of the time and wake up periodically. I tried to use a timer with ACLK and interrupt. Everithing works correctly when i start it with the debugger. When running without debugger it looks like ACLK is not working and no interrupt occours.
I wrote a simple blinker programm to reproduce the problem (see below): with the debugger the led blinks; without debugger nothing happens.
Can somebody help me to figure out what I'm doing wrong?
Thanks
Claudio
#include <msp430.h>
#include <intrinsics.h>
int main(void) {
WDTCTL = WDTPW | WDTHOLD;
P1OUT |= BIT0;
P1DIR |= BIT0;
TACCR0 = 3000;
TACCTL0 = CCIE;
TACTL = TASSEL_1|MC_1|ID_2|TACLR;
__enable_interrupt ();
while (1) {}
}
#pragma vector = TIMERA0_VECTOR
__interrupt void TA0_ISR (void)
{
P1OUT ^= BIT0;
}