If I want to enable interrupts for a UART, say UART1 for both transmission and reception, how do I include both the transmission and reception ISR's in the startup.ccs file since it shows a single place to put both the ISR's
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.
If I want to enable interrupts for a UART, say UART1 for both transmission and reception, how do I include both the transmission and reception ISR's in the startup.ccs file since it shows a single place to put both the ISR's
I'm moving this to the Microcontrollers forum.
Hello Burhan,
The ISR will be a single function for both UART TX and RX. In the Interrupt Service Routine you would need to read the Masked Status to see which of the two has caused the interrupt to be asserted and then process the same accordingly. As an example
void UART1InterruptHandler(void)
{
uint32_t ui32MaskedInterruptStatus = UARTIntStatus(UART0_BASE, true)
if(ui32MaskedInterruptStatus & UART_INT_TX)
{
}
if(ui32MaskedInterruptStatus & UART_INT_RX)
{
}
}
Regards
Amit
wow.. that solves the problem. thank you so much for the timely reply. much appreciated