Skip to content

fix(uart): use no parity for the debug UART with the HAL v2 driver - #3123

Merged
fpistm merged 1 commit into
stm32duino:mainfrom
fpistm:fix_debug_uartv2
Nov 24, 2026
Merged

fpistm merged 1 commit into
stm32duino:mainfrom
fpistm:fix_debug_uartv2

Conversation

@fpistm

@fpistm fpistm commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Initialize the debug UART with no parity with the HAL v2 driver.

This PR fixes/implements the following bugs/features

  • Bug 1: the debug UART is initialized with HAL_UART_PARITY_ODD with the HAL v2 driver

uart_debug_init() documents the default configuration as 8N1 and the HAL v1 driver uses UART_PARITY_NONE, but the HAL v2 driver was initialized with HAL_UART_PARITY_ODD. The core logs (core_debug()) and the printf() output sent on the debug UART are then 8O1 frames, not readable with the documented 8N1 terminal settings.

Fixes #3122

@fpistm fpistm added the fix 🩹 Bug fix label Nov 24, 2026
@fpistm fpistm added this to the 3.2.0 milestone Nov 24, 2026
uart_debug_init() documents the default configuration as 8N1 and the
HAL v1 driver uses UART_PARITY_NONE, but the HAL v2 driver was
initialized with HAL_UART_PARITY_ODD. The core logs sent on the debug
UART were then not readable with a standard 8N1 terminal.

Fixes stm32duino#3122

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm
fpistm merged commit 77b4c91 into stm32duino:main Nov 24, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in STM32 core based on ST HAL Nov 24, 2026
@fpistm
fpistm deleted the fix_debug_uartv2 branch November 24, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 🩹 Bug fix

Projects

Development

Successfully merging this pull request may close these issues.

Debug UART is initialized with odd parity with the HAL v2 driver

1 participant