I am figuring i am missing something small here. I am using code composer V6 with an MSP430F2013 chip. i am simply trying to create a clock using an internal counter and it seems to work however the interrupts seem to fail.
for my clock i have DCOCLK as MCLK running at 16MHz. my SMCLK is set as DCOCLK / 4 = 4MHz.
My Timer A source is SMCLK / 8 = 500kHz = 500 ticks/ms
i set TACCR0 = 500 so as to create an interrupt every ~1ms and have a counter incremented. [timer_a_milliseconds++]
it never registers the interrupt and goes into the interrupt path. here is my interrupt setup
#pragma vector = TIMER0_A0_VECTOR __interrupt void Timer_A(void){ timer_a_milliseconds++;
TACTL |= TACLR; }
I am using the MCx MODE UP. so i am generating 2 interrupts a CCIFG and a TAIFG. the CCIFG appears to clear when i go into the interrupt but the TAIFG does not even though i do TACTL |= TACLR.
even though in debug mode i can see TAR counting up and resetting when it reaches 500, the TAIV register never clears the TAIFG flag so TAIV register always reads 0x0A. then it loops into a state of i am doing doing nothing about it. is there something tricky about a simple timer interrupt using code composer?