Garbled Characters in HAL_UART_Transmit_IT on STM32 F303RE Causes and Solutions
I’m using
HAL_UART_Transmit_IT
in two places with the Nucleo F303RE board. In HAL_UART_RxCpltCallback
, I use it to echo received UART data, and it works fine.
In Print_CAN_Frame
, I send messages every 3 seconds. Previously, I used HAL_UART_Transmit
, which worked, but after switching to HAL_UART_Transmit_IT
, I get garbled characters in TeraTerm. Both functions use the same UART configuration: BaudRate 115200, WordLength 8B, StopBits 1, Parity None, TX/RX Mode.
The issue appears only with interrupt-driven transmission. What could be causing this behavior, considering both functions take identical arguments, and how should I handle potential buffer or timing issues?
Here is my code file;1 Reply