Other Parts Discussed in Thread: MSP430WARE, MSP430F5338, MSP430F5419
I used following code to toggle the port every 10ms
TA0CCTL0 = CCIE; // CCR0 interrupt enabled
TA0CCR0 = 20000;
TA0CTL = TASSEL_2 | MC_1 | TACLR; // SMCLK, upmode, clear TAR (SMCLK=4 Mhz)
#pragma vector=TIMER0_A0_VECTOR
__interrupt void TIMER0_A0_ISR(void)
{
P1OUT ^= 0x01; // Toggle P1.0
}
But the ISR will be never executed.
The following code works??
#pragma vector=TIMER0_A1_VECTOR
__interrupt void TIMER0_A1_ISR(void)
{
P1OUT ^= 0x01; // Toggle P1.0
}
Using IAR Compiler :)