Skip to content
Snippets Groups Projects
Commit 225b7431 authored by Per Lindgren's avatar Per Lindgren
Browse files

serial works

parent 3cf74dd0
No related branches found
No related tags found
No related merge requests found
...@@ -27,8 +27,7 @@ fn main() { ...@@ -27,8 +27,7 @@ fn main() {
let tx = gpioa.pa2.into_af7(&mut gpioa.moder, &mut gpioa.afrl); 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 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), 115_200.bps(), clocks, &mut rcc.apb1);
let serial = Serial::usart2(p.USART2, (tx, rx), 57_600.bps(), clocks, &mut rcc.apb1);
let (mut tx, mut rx) = serial.split(); let (mut tx, mut rx) = serial.split();
loop { loop {
......
...@@ -93,7 +93,7 @@ impl APB2 { ...@@ -93,7 +93,7 @@ impl APB2 {
} }
} }
const HSI: u32 = 8_000_000; // Hz const HSI: u32 = 16_000_000; // Hz
/// Clock configuration /// Clock configuration
pub struct CFGR { pub struct CFGR {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment