drivers/uart: stm32: fix a bug during transmission
If a transmission is made with poll_out and immediately after an other transmission is made with interrupt api the transmission is locked. We fix this behavior by clearing the tx_poll_stream_on flag during the irq_tx_enable function Signed-off-by: Julien D'ascenzio <julien.dascenzio@paratronic.fr>
This commit is contained in:
parent
ffa0c52552
commit
7b21050f19
|
@ -594,11 +594,13 @@ static void uart_stm32_irq_tx_enable(const struct device *dev)
|
|||
{
|
||||
USART_TypeDef *UartInstance = UART_STRUCT(dev);
|
||||
|
||||
LL_USART_EnableIT_TC(UartInstance);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
struct uart_stm32_data *data = DEV_DATA(dev);
|
||||
|
||||
data->tx_poll_stream_on = false;
|
||||
uart_stm32_pm_constraint_set(dev);
|
||||
#endif
|
||||
LL_USART_EnableIT_TC(UartInstance);
|
||||
}
|
||||
|
||||
static void uart_stm32_irq_tx_disable(const struct device *dev)
|
||||
|
|
Loading…
Reference in a new issue