Skip to content

Commit 08877f7

Browse files
author
modulitos
committed
docs(usart1 init): add comment to set the proper baud rate
1 parent 569e0c0 commit 08877f7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/11-usart/auxiliary/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ pub fn init() -> (&'static mut usart1::RegisterBlock, MonoTimer, ITM) {
2929
let rx = gpioa.pa10.into_af7(&mut gpioa.moder, &mut gpioa.afrh);
3030

3131
Serial::usart1(dp.USART1, (tx, rx), 115_200.bps(), clocks, &mut rcc.apb2);
32+
// If you are having trouble sending/receiving data to/from the
33+
// HC-05 bluetooth module, try this configuration instead:
34+
// Serial::usart1(dp.USART1, (tx, rx), 9600.bps(), clocks, &mut rcc.apb2);
3235

3336
unsafe {
3437
(

src/13-serial-over-bluetooth/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ Recommended steps to wire this up:
2222
And that's it! You should be able to run all the programs you wrote in [section 11] without
2323
modification! Just make sure you open the right serial device / COM port.
2424

25+
**NOTE** If you are having trouble communicating with the bluetooth device, you may need to initialize USART1 with a lower baud rate. Lowering it from 115,200 bps to 9,600 bps might help, as described [here](https://github.com/rust-embedded/discovery/blob/master/src/11-usart/auxiliary/src/lib.rs#L31)
26+
2527
[section 11]: ../11-usart/index.html

0 commit comments

Comments
 (0)