-
Notifications
You must be signed in to change notification settings - Fork 367
Fix UART to handle CPU/APB clock changes #808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e92d74c to
344d9d1
Compare
344d9d1 to
ef96277
Compare
ef96277 to
79549a2
Compare
| } | ||
| use crate::gpio::*; | ||
| // not real, just to satify the type | ||
| type Pins<'a> = TxRxPins<'a, GpioPin<Output<PushPull>, 2>, GpioPin<Input<Floating>, 0>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone has a better idea of how to satisfy this let me know.
bjoernQ
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
jessebraham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
* Ensure that uart is configured to account for clock changes, not just boot defaults * fix examples * changelog --------- Co-authored-by: Jesse Braham <[email protected]>
For the ESP32 and ESP32-S2, baud rate can be affected by CPU speed, which was causing issues in the stub: esp-rs/esp-flasher-stub#29 ( and perhaps some esp-wifi projects?).
newnow takes a reference to the CPU clock and adjusts its baud calculations accordingly.Must
errorsorwarnings.cargo fmtwas run.CHANGELOG.mdin the proper section.Nice to have