Other Parts Discussed in Thread: MSP-EXP430FR4133, MSP430WARE
Hi there!
I've just received my launchpad MSP-EXP430FR4133 and tried to run some sample code examples from MSP430Ware.
None of the examples with timers (A0 or A1) does not work. After setting GIE flag it throws me to isr_trap.asm indicating that I didn't provided the interrupt handler for timer. Here is the example from MSP430Ware that doesn't work for me.
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop WDT
// Configure GPIO
P1DIR |= BIT0; // P1.0 output
P1OUT |= BIT0; // P1.0 high
// Disable the GPIO power-on default high-impedance mode to activate
// previously configured port settings
PM5CTL0 &= ~LOCKLPM5;
TA0CCTL0 |= CCIE; // TACCR0 interrupt enabled
TA0CCR0 = 50000;
TA0CTL |= TASSEL__SMCLK | MC__CONTINOUS; // SMCLK, continuous mode
__bis_SR_register(LPM0_bits | GIE); // Enter LPM3 w/ interrupts
__no_operation(); // For debugger
}
// Timer A0 interrupt service routine
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector = TIMER0_A0_VECTOR
__interrupt void Timer_A (void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(TIMER0_A0_VECTOR))) Timer_A (void)
#else
#error Compiler not supported!
#endif
{
P1OUT ^= BIT0;
TA0CCR0 += 50000; // Add Offset to TACCR0
}