-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cpu/samd5x: support for using ext_osc + xosc + fdpll #22012
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
base: master
Are you sure you want to change the base?
Conversation
1645d52 to
3b24d05
Compare
771114f to
08df288
Compare
crasbe
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.
It would be good to have some documentation for the newly added defines IMO. Which are permissible values at least.
8ead4ca to
e30b2de
Compare
cpu/samd5x/cpu.c
Outdated
| while (!(OSC32KCTRL->STATUS.reg & OSC32KCTRL_STATUS_XOSC32KRDY)) {} | ||
| } | ||
|
|
||
| /* XOSC0 is run by an external oscillator 0 (default (cristal)) or 1 (external oscillator) */ |
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.
| /* XOSC0 is run by an external oscillator 0 (default (cristal)) or 1 (external oscillator) */ | |
| /* XOSC0 is run by an external oscillator 0 (default (crystal)) or 1 (external oscillator) */ |
cpu/samd5x/cpu.c
Outdated
| # define XOSC0_EXT_OSC (0) | ||
| #endif | ||
|
|
||
| /* XOSC1 is run by an external oscillator 0 (default (cristal)) or 1 (external oscillator) */ |
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.
| /* XOSC1 is run by an external oscillator 0 (default (cristal)) or 1 (external oscillator) */ | |
| /* XOSC1 is run by an external oscillator 0 (default (crystal)) or 1 (external oscillator) */ |
e30b2de to
1682d51
Compare
1682d51 to
e8b15b8
Compare
|
@crasbe: is this good enough of documentation? i think i did as well as the previously exiting options and if one has a not copyable board configuration they need to look in this file anyway as the clock configuration is kinda difficult and board cpu combination specific. |
Looks good. My point was just to avoid having more "black box defines". And as you said, clock configuration is difficult, but it's more difficult if it's undocumented 😅 |
Contribution description
adds support for using external oscillator with xosc into pll into main_clk
the intermediate frequency is 1 -> should fit for all N MHz clk sources to N MHz cpu frequency
Testing procedure
set
Frequency and XOSC<0|1> should be adjusted -> this configuration was a USB clk connect to XOSC0
do not set
Issues/PRs references