forked from microsoft/uf2-samdx1
-
Notifications
You must be signed in to change notification settings - Fork 184
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
SAMD21 Clock Config #179
Comments
Hmm, that does seem wrong, and it's an accident that's it's working now, perhaps. If you fix this, does the bootloader still work? |
It does appear to function correctly after the change, yes. Boots OK...can flash circuitpython with a .uf2 update file. |
A PR would be welcome, if you feel so inclined. |
This was fixed in #188 and can be closed. |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the crystalless clock config section of the system_init() funtion in init_samd21.c there is this line (setting up OSC8M on GCLK_gen 2):
GCLK->GENCTRL.reg = GCLK_GENCTRL_ID(2) | GCLK_GENCTRL_SRC_OSC8M_Val | GCLK_GENCTRL_GENEN;
Why is GCLK_GENCTRL_SRC_OSC8M_Val used? I would've expected his value to be bit-shifted into place using the GCLK_GENCTRL_SRC_OSC8M define.
Thanks
The text was updated successfully, but these errors were encountered: