From 2e7c0f82a66161fb4a755047ce0b48e1b24915fa Mon Sep 17 00:00:00 2001 From: unicod Date: Sat, 14 Feb 2026 17:20:05 +0100 Subject: [PATCH] UART5 TX INT handler fix --- Core/Src/uart5_it.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Src/uart5_it.c b/Core/Src/uart5_it.c index 0d3627a..154253b 100644 --- a/Core/Src/uart5_it.c +++ b/Core/Src/uart5_it.c @@ -77,9 +77,9 @@ void UART5_IRQHandler(void) { LL_USART_TransmitData8(UART5, Uart5TxBuf[rd]); // send data byte Uart5TxRdIdx = rd; // Store new index } - if (wr == rd) { // data buffer empty - LL_USART_DisableIT_TXE(UART5); // INT disable - } + } + if (Uart5TxWrIdx == Uart5TxRdIdx) { // data buffer empty + LL_USART_DisableIT_TXE(UART5); // INT disable } }