We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3aaab3 commit 3aac684Copy full SHA for 3aac684
stm32-uart-echo/Sources/Application/Application.swift
@@ -50,7 +50,8 @@ public struct Application {
50
gpiob.afrl.modify { $0.raw.afrl7 = 0b0111 }
51
52
// Configure UART1
53
- // Set the baud rate to 16Mhz
+ // Set the baud rate to 115200 (by computing the divisor based on the 16Mhz
54
+ // default post-reset CPU clock frequency)
55
usart1.brr.modify { $0.raw.storage = 16_000_000 / 115200 }
56
57
usart1.cr1.modify { rw in
0 commit comments