I'm using MCUXpresso 10.2.1 with a custom board based on MK66F2M0.
I'm facing with a strange situation: sometimes I get the UART interrupt handling the RX data register full event, but in the buffer there is no data available.
/* Receive data register full */
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;
count = 1;
In this situation I get count = 0.
Why there is the rx data event and no data is available?
How can this situation be generated?