From 61a57859080fbbdf1aa1b9cb8f834a11ae939f38 Mon Sep 17 00:00:00 2001 From: unicod Date: Thu, 26 Feb 2026 23:17:58 +0100 Subject: [PATCH] UART5 fix, big TX buffer for large listing --- Core/Inc/uart5_it_cfg.h | 2 +- Core/Src/uart5_it.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Core/Inc/uart5_it_cfg.h b/Core/Inc/uart5_it_cfg.h index 82ccf3e..aa0db4f 100644 --- a/Core/Inc/uart5_it_cfg.h +++ b/Core/Inc/uart5_it_cfg.h @@ -5,7 +5,7 @@ #define UART5_RXBUF_SIZE 1024 -#define UART5_TXBUF_SIZE 1024 +#define UART5_TXBUF_SIZE 8192 diff --git a/Core/Src/uart5_it.c b/Core/Src/uart5_it.c index 154253b..7413193 100644 --- a/Core/Src/uart5_it.c +++ b/Core/Src/uart5_it.c @@ -76,11 +76,10 @@ void UART5_IRQHandler(void) { rd = (rd + 1) & UART5_TXBUF_MASK; // new read index LL_USART_TransmitData8(UART5, Uart5TxBuf[rd]); // send data byte Uart5TxRdIdx = rd; // Store new index + }else { // data buffer empty + LL_USART_DisableIT_TXE_TXFNF(UART5); // INT disable } } - if (Uart5TxWrIdx == Uart5TxRdIdx) { // data buffer empty - LL_USART_DisableIT_TXE(UART5); // INT disable - } }