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.

Slight MSP430f5529 Interrupt Issue.

Other Parts Discussed in Thread: ENERGIA

So this is my first time working with an f5529. I'm just trying to set up a basic UART Tx to the serial monitor for debugging. This is how I have my interrupt set up:

#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(USCI_A0_VECTOR))) USCI_A0_ISR (void)
#else
#error Compiler not supported!
#endif
{
  switch(__even_in_range(UCA0IV,4))
  {
  case 0: break;                             // Vector 0 - no interrupt
  case 2: break;                                 // Vector 2 - RXIFG
  case 4: break;                             // Vector 4 - TXIFG
  default: break;
  }
}

I found it in some example code, so I figured that this would work, but whenever I try to compile, I get the error "'__even_in_range' was not declared in this scope". I wasn't getting the error the other day but now I am. Would it be because of the defines? I am using Energia as my platform.

Thanks

 

  • Gabe,

    "__even_in_range( )" is a compiler intrinsic for IAR and CCS. It will not work in Energia for it uses a different compiler. The purpose of the intrinsic is to optimized the switch within an interrupt.

    Regards,
    JH

**Attention** This is a public forum