Hi , I am developing in MSP430F5335 + CC2564 with IAR SPPLEDemo_Lite project.
I want to use the timer for flash the LED (P9.4).
I try to use the following code
void ConfigureTimerForLED()
{
P9DIR |= BIT4; // P9.4 output
TA2CCTL0 = CCIE; // CCR0 interrupt enabled
TA2CCR0 = 50000;
TA2CTL = TASSEL_2 + MC_2 + TACLR; // SMCLK, contmode, clear TAR
}
#pragma vector=TIMER2_A0_VECTOR
__interrupt void TIMER2_A0_ISR(void)
{
P9OUT ^= BIT4; // Toggle P9.4
TA2CCR0 += 50000; // Add Offset to CCR0
}
When I call the ConfigureTimerForLED , the P9.4 will turn to High. And than the LED did not do anything...
Did I missing something ?