-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CPU SAML21: fix timers frequency when using slow clocks #16446
CPU SAML21: fix timers frequency when using slow clocks #16446
Conversation
8392e2f
to
2b213b2
Compare
Looks good to me - just a minor thing: please prefix the commits with the subsystem they are touching, so
|
2b213b2
to
7a253b4
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.
One comment otherwise looks good.
c72f429
to
cd6912e
Compare
cd6912e
to
c03816f
Compare
LGTM, tested on @benpicco any last word ? |
There is a case for using OSC16M instead of the DFLL - the buck converter can only be enabled if no DPLL/DFLL is used (see errata sheet). |
If I am not mistaken, that errata should be already taken care of, in |
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.
ACK.
Re-tested on SAML21. Looks good so far.
Here we go. |
Thanks a lot! |
My recently merged PR #16433 introduces a bug: when OSC16M is not running at 16MHz, the timer clock SAM0_GCLK_8MHZ is no longer correct.
I've renamed SAM0_GCLK_8MHZ as SAM0_GCLK_TIMER, and compute it as 4MHz or 8MHz depending on the frequency of the core clock - CLOCK_CORECLOCK at 4MHz or at 12MHz result in SAM0_GCLK_TIMER at 4MHz, all other available core clocks still produce the original 8MHz one.