Skip to content

stm32 usart: program BRR before enabling the USART - #2751

Open
Ramla-I wants to merge 3 commits into
oxidecomputer:masterfrom
Ramla-I:usart-brr-before-ue
Open

Ramla-I wants to merge 3 commits into
oxidecomputer:masterfrom
Ramla-I:usart-brr-before-ue

Conversation

@Ramla-I

@Ramla-I Ramla-I commented Oct 27, 2026

Copy link
Copy Markdown

Fixes #2707.

RM0433 and RM0316 require that the baud-rate register BRR only be written while the USART is disabled (UE=0), but both the stm32h7 and stm32fx USART drivers set UE=1 before writing BRR. This reorders the init sequence in both drivers so BRR is programmed first and the USART is enabled afterwards. No functional change otherwise.

Ramla-I and others added 3 commits October 27, 2026 11:55
Per the reference manuals (RM0316, RM0433), the baud rate register may
only be written while the USART is disabled (UE=0). Move the UE enable
after the BRR write in both the stm32fx and stm32h7 USART drivers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

STM32 USART drivers write BRR while UE=1 (RM0433 / RM0316 require UE=0)

1 participant