-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow support of crystals other than 12MHz (#1024) #1272
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
Allow support of crystals other than 12MHz (#1024) #1272
Conversation
|
I have just pushed some changes for comment which I think address the XOSC and system frequency related hard-codings in the SDK. I expect some review changes but I'd like to do some more testing of this before it is merged anyway. |
andygpz11
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.
Latest version. I think I have addressed all comments.
I also found that one of the asserts in pll_init() was non-functional due to an error of scaling and also that check_sys_clock_khz() should not use clock_get_hz() but the XOSC_MHZ define instead.
Apparently the PLL ref divs inputs are always connected to the output of the XOSC cell and therefore the (possible) multiplexing and division present in the clock switching is not applicable to them.
|
This looks good to me, apart from the btstack related commit |
Thanks and agreed. I found I could not push to my branch because there was another push that I hadn't got locally. |
well you have picked up some other stuff it seems (bt license) |
d83a4a0 to
d4b975a
Compare
kilograham
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.
please read thru all pre-existing review comments, and issue comments - they keep getting ignored
kilograham
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.
Note all the new user overridable defines should also have PICO_CONFIG comments
|
The |
liamfraser
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.
I think this looks good
| // | ||
| // The two PLLs use the crystal oscillator output directly as their reference frequency input; the PLLs reference | ||
| // frequency cannot be reduced by the dividers present in the clocks block. The crystal frequency is defined by `XOSC_KHZ` or | ||
| // `XOSC_MKHZ`. |
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.
MKHZ? 🤔
|
fixes #1024 |
…rrypi#1272) * Allow pre-processor overrides for Clock/PLL setup * Use `_KHZ` rather than `_MHZ` for `XOSC_` `SYS_CLOCK_` etc definitions (`_MHZ` versions are provided for compatibility when `_KHZ` is a multiple of 1000) Co-authored-by: graham sanderson <[email protected]>
Improve the current hardcoded PLL and clock set-up