SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on how to get your MSP JTAG programmer up and running.
By composer
#138277
I supplied the code for setting up TA in updown mode.I obtained two output frequencies but TA interrupt routine is not executing when TA reaches CCRO.Can anyone help, please.I can supply the whole code if necessary.Microcontroller is msp430f149.



P1DIR |= 0x0C; // P1.2,3 output
P1SEL |= 0x0C; // P1.2 and P1.3 TA1/2 options



CCR0 = 2400-1;
CCTL1 = OUTMOD_6;
CCTL2 = OUTMOD_2;
CCR1=500;
CCR2=1000;

CCTL0 = CCIE; // CCR0 interrupt enabled


TACTL = TASSEL_1 + MC_3 + TAIE; // ACLK, updown mode
By UhClem
#138279
When you say that the TA interrupt routine is not executing on the CCR0 condition I suspect you mean the routine attached to the TAIV interrupt vector isn't executing. TACCR0 uses a different interrupt vector.
Two interrupt vectors are associated with the 16-bit Timer_A module:
TACCR0 interrupt vector for TACCR0 CCIFG
TAIV interrupt vector for all other CCIFG flags and TAIFG