Skip to content

Commit 2a1c94c

Browse files
Benichou34galak
authored andcommitted
Driver: Serial STM32: Fix use of TXE IRQ
In case of TX IRQ pending, uart_stm32_irq_is_pending() function always return 0, because "is TXE enabled ?" is checked instead of "is TC enabled ?". Signed-off-by: Benoit Leforestier <[email protected]>
1 parent b8d2e19 commit 2a1c94c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/serial/uart_stm32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ static int uart_stm32_irq_is_pending(struct device *dev)
538538

539539
return ((LL_USART_IsActiveFlag_RXNE(UartInstance) &&
540540
LL_USART_IsEnabledIT_RXNE(UartInstance)) ||
541-
(LL_USART_IsActiveFlag_TXE(UartInstance) &&
542-
LL_USART_IsEnabledIT_TXE(UartInstance)));
541+
(LL_USART_IsActiveFlag_TC(UartInstance) &&
542+
LL_USART_IsEnabledIT_TC(UartInstance)));
543543
}
544544

545545
static int uart_stm32_irq_update(struct device *dev)

0 commit comments

Comments
 (0)