Skip to content
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

Bootrom function _reset_to_usb_boot only works if XOSC is running #3

Open
jannic opened this issue Feb 1, 2021 · 0 comments
Open

Comments

@jannic
Copy link

jannic commented Feb 1, 2021

The bootrom function _reset_to_usb_boot (code 'U', 'B') fails to reboot to USB if the XOSC is not running.

This seems to be caused by the use of watchdog_reboot(), which switches to this oscillator without checking if it is running: https://github.com/raspberrypi/pico-bootrom/blob/master/usb_device_tiny/runtime.c#L94-L96
(called from https://github.com/raspberrypi/pico-bootrom/blob/master/bootrom/bootrom_main.c#L222)

As a workaround, before calling the bootrom function, the oscillator should be started if it's not running. (It's not necessary to switch to the XOSC oscillator.)
It may also be necessary to ensure other parts of the clock configuration are compatible with the XOSC oscillator. I didn't check that. However, the default configuration after bootup is compatible, it's only missing the XOSC startup.

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

No branches or pull requests

1 participant