diff --git a/examples/serial-echo.rs b/examples/serial-echo.rs index 451c6acb7bc0df59a74eeb75a54cda94a19ac998..837ba7cb7aecb2ea856641d85bf825862566e406 100644 --- a/examples/serial-echo.rs +++ b/examples/serial-echo.rs @@ -27,8 +27,7 @@ fn main() { let tx = gpioa.pa2.into_af7(&mut gpioa.moder, &mut gpioa.afrl); let rx = gpioa.pa3.into_af7(&mut gpioa.moder, &mut gpioa.afrl); - //let serial = Serial::usart2(p.USART2, (tx, rx), 115_200.bps(), clocks, &mut rcc.apb1); - let serial = Serial::usart2(p.USART2, (tx, rx), 57_600.bps(), clocks, &mut rcc.apb1); + let serial = Serial::usart2(p.USART2, (tx, rx), 115_200.bps(), clocks, &mut rcc.apb1); let (mut tx, mut rx) = serial.split(); loop { diff --git a/src/rcc.rs b/src/rcc.rs index ca56b29074d6217050f94f28f4c7085e894503e6..46a8529782ea2e3037a18c73ed7b7a9127f01326 100644 --- a/src/rcc.rs +++ b/src/rcc.rs @@ -93,7 +93,7 @@ impl APB2 { } } -const HSI: u32 = 8_000_000; // Hz +const HSI: u32 = 16_000_000; // Hz /// Clock configuration pub struct CFGR {