From fe89d8222d65ec6aecc105ee5d658b2e6da95ece Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Wed, 24 Jun 2026 13:41:56 +0200 Subject: [PATCH] Let HAL know when DMA is done --- Core/Src/cansend.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/Src/cansend.c b/Core/Src/cansend.c index 3a9f4dc..79327f2 100644 --- a/Core/Src/cansend.c +++ b/Core/Src/cansend.c @@ -92,7 +92,11 @@ static int format_can_message(char *buf, uint8_t source, const CanMessage_t *mes */ void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) { - if (huart->Instance == USART1) osSemaphoreRelease(xUARTDMASemaphore); + if (huart->Instance == USART1) + { + huart->gState = HAL_UART_STATE_READY; + osSemaphoreRelease(xUARTDMASemaphore); + } } /* END HAL_UART_TxCpltCallback */