Commit 7388970c authored by Dawid Niedzwiecki's avatar Dawid Niedzwiecki Committed by Carles Cufi
Browse files

serial: stm32: do not clear TC flag in async mode



The Transfer Complete flag (TC) is used to check if a transfer is
complete. This mechanism is used before suspending the UART module to
make sure that all data are sent before the suspend procedure.

The UART ISR clears this flag after completion of a async transfer which
causes a hang during UART device suspend setup.

There is just no need to clear this flag in ISR, it is cleared every
time we start a new async transfer.

Signed-off-by: default avatarDawid Niedzwiecki <dawidn@google.com>
parent e6f77f9b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1257,7 +1257,6 @@ static void uart_stm32_isr(const struct device *dev)
			LL_USART_IsActiveFlag_TC(config->usart)) {

		LL_USART_DisableIT_TC(config->usart);
		LL_USART_ClearFlag_TC(config->usart);
		/* Generate TX_DONE event when transmission is done */
		async_evt_tx_done(data);