From 17c500e39af952e6a190e9cfca202848bd918305 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Wed, 17 Jun 2026 18:11:46 +0200 Subject: [PATCH] Add debug messages for UART --- Core/Src/cansend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/Src/cansend.c b/Core/Src/cansend.c index cbc5a78..3831c7a 100644 --- a/Core/Src/cansend.c +++ b/Core/Src/cansend.c @@ -103,11 +103,14 @@ void vUARTLogger(void *argument) for (;;) { + DEBUG_PRINT("Waiting for CAN traffic...\r\n"); if (osMessageQueueGet(xUARTQueue, &message, NULL, osWaitForever) == osOK) { - format_can_message(tx_buffer, message.source, &message); // Assuming you add 'source' to the struct + DEBUG_PRINT("CAN frame detected\r\n"); + format_can_message(tx_buffer, message.source, &message); HAL_UART_Transmit_DMA(&huart1, (uint8_t*)tx_buffer, 44); osSemaphoreAcquire(xUARTDMASemaphore, osWaitForever); + DEBUG_PRINT("CAN frame sent via UART\r\n"); } } }