Skip to content

Fix comment about baud rate #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stm32-uart-echo/Sources/Application/Application.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public struct Application {
gpiob.afrl.modify { $0.raw.afrl7 = 0b0111 }

// Configure UART1
// Set the baud rate to 16Mhz
// Set the baud rate to 115200 (by computing the divisor based on the 16Mhz
// default post-reset CPU clock frequency)
usart1.brr.modify { $0.raw.storage = 16_000_000 / 115200 }

usart1.cr1.modify { rw in
Expand Down
Loading