drivers: uart stm32 flushing Rx register once the RXNE irq is enabled

When the "Read data register not empty" irq occurs,
this commit is cleaning the RXNE flag by flushing the RX register
since the Receive Data Reg. (USART_RDR) has not be read previously
This could be the case when aborting a Rx for example.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c
index 66cca05..a41dbe2 100644
--- a/drivers/serial/uart_stm32.c
+++ b/drivers/serial/uart_stm32.c
@@ -888,7 +888,7 @@
 			uart_stm32_dma_rx_flush(dev);
 		}
 	} else if (LL_USART_IsEnabledIT_TC(UartInstance) &&
-			  LL_USART_IsActiveFlag_TC(UartInstance)) {
+			LL_USART_IsActiveFlag_TC(UartInstance)) {
 
 		LL_USART_DisableIT_TC(UartInstance);
 		LL_USART_ClearFlag_TC(UartInstance);
@@ -898,6 +898,10 @@
 #ifdef CONFIG_PM
 		uart_stm32_pm_constraint_release(dev);
 #endif
+	} else if (LL_USART_IsEnabledIT_RXNE(UartInstance) &&
+			LL_USART_IsActiveFlag_RXNE(UartInstance)) {
+		/* clear the RXNE by flushing the fifo, because Rx data was not read */
+		LL_USART_RequestRxDataFlush(UartInstance);
 	}
 
 	/* Clear errors */
@@ -979,7 +983,7 @@
 	data->rx_next_buffer = NULL;
 	data->rx_next_buffer_len = 0;
 
-	/*when async rx is disabled, enable interruptable instance of uart to function normally*/
+	/* When async rx is disabled, enable interruptable instance of uart to function normally*/
 	LL_USART_EnableIT_RXNE(UartInstance);
 
 	LOG_DBG("rx: disabled");