-
Notifications
You must be signed in to change notification settings - Fork 215
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
Add mechanism to configure UART source clock #1416
Add mechanism to configure UART source clock #1416
Conversation
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.
Changes mostly LGTM! Just left a few comments, thanks for taking care of this!
46af4e9
to
93984f6
Compare
b55d22a
to
2426e2a
Compare
2426e2a
to
f06327f
Compare
Resolved the conflicts with |
42289c5
to
75ac237
Compare
It's rebased now cc: @SergioGasquez |
75ac237
to
f362ac1
Compare
Rebased again |
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 for working on this!
f362ac1
to
e8971a9
Compare
@@ -28,6 +28,8 @@ pub(crate) mod constants { | |||
|
|||
pub const SOC_DRAM_LOW: u32 = 0x3FFA_E000; | |||
pub const SOC_DRAM_HIGH: u32 = 0x4000_0000; | |||
|
|||
pub const REF_TICK: fugit::HertzU32 = fugit::HertzU32::MHz(1); |
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.
I wonder if these shouldn't go into clock::Clocks
- on the other hand we already have a few frequencies here.
Most probably okay for now and we should rework the whole clocks
thing since it's not very maintainable as it looks now 🤷♂️
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.
I thought about that too, but then I saw that it's used like twice in the whole driver (including this PR), so it was decided to leave it in the soc
module for now. However, yes, after clocks
thing is reworked, I guess we should consider having all the clock frequencies there
PS: Second place where REF_TICK
freq is used:
https://github.com/esp-rs/esp-hal/blob/main/esp-hal/src/clock/clocks_ll/esp32.rs#L6
update doc comments
e8971a9
to
89f542c
Compare
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 for working on this!
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, thank you for this!
closes #1181