This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/msp430F5529: Timer2 error when debugging - simple delay function - error

Part Number: MSP430F5529


Tool/software: Code Composer Studio

I am using an example code from the TI MSP430 Library.  The code is very simple and it should work but I am getting an error when I debug.

void main(void)
{
    WDTCTL = WDTPW+WDTHOLD;              // Stop watchdog timer
   P1DIR |= BIT0;
P4DIR |= BIT7;
while(1) { delay(6000); // delay 6 seconds (i think?) P1OUT ^= BIT0; // Toggle P1.0 } } void delay(long int time) { TA2CCTL0 = CCIE; // CCR0 interrupt enabled TA2CCR0 = time; TA2CTL = TASSEL_2 + MC_2 + TACLR; // SMCLK, contmode, clear TAR __bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts __no_operation(); // For debugger
return; } // Timer2 interrupt service routine #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=TIMER2_A0_VECTOR __interrupt void TIMER2_A0_ISR(void) #elif defined(__GNUC__) void __attribute__ ((interrupt(TIMER2_A0_VECTOR))) TIMER2_A0_ISR (void) #else #error Compiler not supported! #endif { P4OUT ^= BIT7; // Toggle P4.7 led }

I am getting an error when I enter the interrupt.  It reads.

"No source available for "0x3fe"."

The P4.7 LED binks once every 1/2 second....not sure why.

And the P1.0 LED does not blink at all.   Indicating the code does not go through the return statement and back to the while loop.

I am attempting to blink the P1.0 LED every 6 seconds.

Any help would be great.

**Attention** This is a public forum