Skip to content

RP2350 Never Runs Boot Stage 2 #10248

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

Open
eightycc opened this issue Apr 14, 2025 · 0 comments
Open

RP2350 Never Runs Boot Stage 2 #10248

eightycc opened this issue Apr 14, 2025 · 0 comments

Comments

@eightycc
Copy link
Collaborator

eightycc commented Apr 14, 2025

At startup, RP2350-based boards do not run boot stage 2. This is due to a change in the way _stage2_boot() is invoked. For the RP2040, boot stage 2 was invoked directly by boot ROM. For the RP2350, stage 2 is invoked by crt0.S under the control of PICO_EMBED_XIP_SETUP. Since CP does not set PICO_EMBED_XIP_SETUP, it defaults to 0, causing _stage2_boot() to not be copied onto the stack and executed. See raspberrypi/pico-sdk#1903.

RP2350 boot ROM tests flash, selecting XIP parameters automatically, including the clock divider and one of four XIP modes (two serial modes, a dual mode, and a quad mode). This obviates the need for boot stage 2 for normal clocking cases. Since CP has been running successfully without boot stage 2, it's clear that it is not needed at this time.

However, this could be an issue for overclocking and flash writes as discussed in the referenced Pico SDK issue. Boot ROM exits from flash writes with flash timing and mode set to its automatically determined values, overriding any changes that may have been made for overclocking.

I'm filing this issue so that this detail doesn't get lost.

@dhalbert dhalbert added this to the 10.0.0 milestone Apr 14, 2025
@tannewt tannewt modified the milestones: 10.0.0, 10.x.x Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants