Skip to content

samx5x: support external clock sources #8183

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

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

Qyriad
Copy link

@Qyriad Qyriad commented Jul 18, 2023

Adds two board config defines, which can be added in a board's mpconfigboard.h: BOARD_XOSC_FREQ_HZ, and BOARD_XOSC_IS_CRYSTAL, which are passed to clock_init(). External clock sources are currently only implemented for SAM_D5X_E5X series chips, so defining BOARD_XOSC_FREQ_HZ for a SAMD21 board will emit an error.

Depends on adafruit/samd-peripherals#45 — see that PR for more details on the implementation.

This is for #6161, but doesn't completely close that issue as this only implements external clock input support for SAME5x/SAMD5x chips.

@Qyriad Qyriad force-pushed the features/samx5x-external-clock branch from 3a7bdd7 to 7fbc951 Compare July 18, 2023 22:47
Adds two board config define's, which can be added in a board's
mpconfigboard.h: BOARD_XOSC_FREQ_HZ, and BOARD_XOSC_IS_CRYSTAL, which
are passed to clock_init(). External clock sources are currently only
implemented for SAM_D5X_E5X series chips, so defining BOARD_XOSC_FREQ_HZ
for a SAMD21 board will emit an error.

Signed-off-by: Qyriad <[email protected]>
@Qyriad Qyriad force-pushed the features/samx5x-external-clock branch from 7fbc951 to 3f3ec1c Compare July 18, 2023 23:13
@dhalbert dhalbert requested a review from tannewt July 19, 2023 03:31
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@tannewt tannewt merged commit 12d1181 into adafruit:main Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants