Hi,
I want to check that whether my Rx ISR is getting executed. I wrote the following code to enable the RX interrupt and the ISR. But my ISR is not getting executed? Can anyone please tell me where am I doing wrong or missing something?
Here is my code for enabling ISR and my ISR routine.
Code for enabling ISR
EUSCI_A_UART_initAdvance(EUSCI_A0_BASE,
EUSCI_A_UART_CLOCKSOURCE_SMCLK,
8,
0,
0xD6,
EUSCI_A_UART_NO_PARITY,
EUSCI_A_UART_LSB_FIRST,
EUSCI_A_UART_ONE_STOP_BIT,
EUSCI_A_UART_MODE,
EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION );
EUSCI_A_UART_enable(EUSCI_A0_BASE);
EUSCI_A_UART_enableInterrupt(EUSCI_A0_BASE,EUSCI_A_UART_RECEIVE_INTERRUPT); // Enable interrupt
__enable_interrupt();
__bis_SR_register(GIE);
ISR :
#pragma vector=USCI_A0_VECTOR
__interrupt void USCI_A0_ISR(void)
{
switch (__even_in_range(UCA0IV, USCI_UART_UCTXCPTIFG)) {
case USCI_NONE: break;
case USCI_UART_UCRXIFG:
//rx = EUSCI_A_UART_receiveData(EUSCI_A0_BASE);
break;
case USCI_UART_UCTXIFG: break;
case USCI_UART_UCSTTIFG: break;
case USCI_UART_UCTXCPTIFG: break;
}
}
Thanks in advance
Ayush