Skip to content

Commit 3aac684

Browse files
authored
Fix comment about baud rate (#103)
1 parent c3aaab3 commit 3aac684

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stm32-uart-echo/Sources/Application/Application.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public struct Application {
5050
gpiob.afrl.modify { $0.raw.afrl7 = 0b0111 }
5151

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

5657
usart1.cr1.modify { rw in

0 commit comments

Comments
 (0)