Skip to content

Make sure we're muxed to the SP before setting the mux to the host#2457

Merged
mkeeter merged 1 commit intomasterfrom
mkeeter/hf-set-mux-check
Mar 27, 2026
Merged

Make sure we're muxed to the SP before setting the mux to the host#2457
mkeeter merged 1 commit intomasterfrom
mkeeter/hf-set-mux-check

Conversation

@mkeeter
Copy link
Copy Markdown
Collaborator

@mkeeter mkeeter commented Mar 27, 2026

I noticed that the SP hangs if you call set_mux(HostCPU) twice in a row. This is because the first call switches the mux from the SP to the host; the second call tries to read from flash while it's muxed to the host (to find the APOB, ABL0 version, etc). When the flash is muxed to the host, the FPGA never loads bytes into the SP's FIFO, so this hangs the hf task forever.

Copy link
Copy Markdown
Collaborator

@labbott labbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this issue always present or did the APOB version pinning make this show up?

@mkeeter
Copy link
Copy Markdown
Collaborator Author

mkeeter commented Mar 27, 2026

I think it's always been present – even before APOB pinning, we'd call ApobState::init in this conditional, which reads from flash to pick the active slot.

@mkeeter mkeeter merged commit c03cc5b into master Mar 27, 2026
180 checks passed
@mkeeter mkeeter deleted the mkeeter/hf-set-mux-check branch March 27, 2026 17:09
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