-
Notifications
You must be signed in to change notification settings - Fork 60
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
Skip /32 AHB prescaler #228
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.
Thanks for the PR! I left a question inline, but on top of that could you also please add a changelog entry under the Fixed
section?
This is good to go aside from:
If you missed it :) |
ac7d048
to
1d2a836
Compare
Added a changelog entry. Also, in the (now obsolete) workflow run, the clippy check failed. Do you want me to fix that in this PR even though it's not a related change? |
You need to add a line at the bottom of the file like this, then the link should work. |
Yeah that's fine, thanks for bringing it up :) |
I'm confused... why did the clippy check succeed this time? 👀 Edit: Ah, apparently this was already fixed here and I hadn't rebased yet. |
df0771c
to
225dc81
Compare
Fixed the changelog link, feel free to merge when you're happy. |
Thanks! |
Fixes #225
There is no /32 AHB prescaler, but the old calculation code assumed there was, causing all calculated clock frequencies with an AHB prescaler > 16 to be off by a factor of 2.
Note that this only affects the frequencies stored in the
Clocks
struct, not the ones actually applied to the AHB frequency.Page 194 of the reference manual shows mapping of register bits to prescaler factors. As far as I can see, those are implemented correctly.