drivers: serial: stm32: remove unnecessary flag clear

According to reference manual, use of TC is "to avoid corrupting the
last transmission when the USART is disabled or enters Halt mode.". It
is safe to remove it since it is not checked when CONFIG_PM=n.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-09-10 11:36:36 +02:00 committed by Anas Nashif
commit a7f13755ed

View file

@ -459,8 +459,6 @@ static void uart_stm32_poll_out(const struct device *dev,
/* do not allow system to suspend until transmission has completed */ /* do not allow system to suspend until transmission has completed */
pm_constraint_set(PM_STATE_SUSPEND_TO_IDLE); pm_constraint_set(PM_STATE_SUSPEND_TO_IDLE);
LL_USART_ClearFlag_TC(UartInstance);
LL_USART_TransmitData8(UartInstance, (uint8_t)c); LL_USART_TransmitData8(UartInstance, (uint8_t)c);
} }