Hi biafra,
Please debug your code, add the two breakpoint here:
if ((UART_S1_RDRF_MASK & base->S1) && (UART_C2_RIE_MASK & base->C2))
{
/* Get the size that can be stored into buffer for this interrupt. */
#if defined(FSL_FEATURE_UART_HAS_FIFO) && FSL_FEATURE_UART_HAS_FIFO
count = base->RCFIFO; // add break point here
#else
count = 1;
#endif
...
}
Can you enter the red code when you debug the code in the interrupt?
Besides, please check you code, do you enable FSL_FEATURE_UART_HAS_FIFO?
If you don't enable the fifo, you need to read the UARTX_D register to clear the RDRF.
You also can check your UARTx_S1, and UARTX_S2, and send me the debug register result when you enter the interrupt.
If you have the oscilloscope, you also can check the RX pin wave, whether there have the interference or really have the UART RX wave.
Any updated information, please kindly let me know.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------