Skip to content

Reset core 1 when initializing flash algo #27

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

jannic
Copy link
Member

@jannic jannic commented Jun 24, 2025

Debug probes usually only do a sysreset before flashing a new firmware. But on rp2040, that only resets core 0, while core 1 might continue running. Depending on the firmware, this may interfere with the flashing. (Often, core 1 will just crash when the flash gets detached from XIP, but that's not guaranteed.)

So before starting the flash algorithm, make sure that core 1 is reset as well.

@jannic jannic marked this pull request as draft June 24, 2025 19:43
@jannic
Copy link
Member Author

jannic commented Jun 24, 2025

(Marked as draft as it may not be valid for rp2350)

@jannic
Copy link
Member Author

jannic commented Jun 24, 2025

While this seems to work reliably, it solves the same issue as probe-rs/probe-rs#3429

Are there other users of flash-algo that might still need a manual reset of core 1?

@9names 9names marked this pull request as ready for review June 24, 2025 21:57
@9names
Copy link
Member

9names commented Jun 24, 2025

Sorry, misclicked the ready for review button :(
And I can't find the "mark as draft" button on mobile

@9names
Copy link
Member

9names commented Jun 24, 2025

There is a world in which you might want to not reset everything, but you want to change flash with both cores halted (emulated breakpoints comes to mind), but I think that wouldn't work with the flash algo as-is, and we should wait until we have someone that needs that first.

@jannic jannic marked this pull request as draft June 25, 2025 09:27
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