-
Notifications
You must be signed in to change notification settings - Fork 2
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
Reset value of XOSC STARTUP register? #158
Comments
@Wren6991 thoughts? |
@eightycc says an empirical measurement shows it's 47: raspberrypi/pico-sdk#401 (comment) |
Just out of curiosity I had a quick look at the source for the |
The empirically-determined 47 sounds like it would be the correct value for 12 MHz (47 * 256 ~= 12000 cycles) so perhaps that has not been read directly after reset? 47 would also be the value written by |
It's handling two cases:
The XOSC digital controls will preserve the last valid value written to the RANGE field when an invalid value (no All that being said, it's interesting that the bootrom has a ~4x longer startup delay than the SDK code, because it's using the maximum XI frequency of 50 MHz for the range calculation (in hw source), rather than the nominal 12 MHz. I'll see if I can get those reset values to appear in the datasheet like they should. |
The live datasheet has the reset values now |
The bootrom code starts the XOSC, and waits for a startup delay, but does not set the STARTUP register beforehand (at least I can't find it).
https://github.com/raspberrypi/pico-bootrom/blob/00a4a19114195e20fb817bdfbca1165e157eef37/bootrom/bootrom_main.c#L137-L146
But there is not a reset value given in the datasheet:

Is the bootroom code expecting and depending on a particular reset value for STARTUP? Thanks.
This may be relevant to raspberrypi/pico-sdk#401 (comment).
The text was updated successfully, but these errors were encountered: