fix(anchor): the chip-id halt names its cause and repeats it - #1043
Merged
Merged
Conversation
The firmware halted at boot with "[T1] chip id: FAIL" and nothing else: the libtropic error was discarded and the raw link probe's MISO bytes were thrown away. It printed once, before any host attached, so a phone saw only a board that took its USB connection and never answered. Both rig anchors were in this state after the phones were swapped, and nothing on the phone could say why. The halt now prints the library's error and the probe's MISO bytes, and repeats them every two seconds so a late host reads them. On the rig it read `ChipBusy; raw probe MISO [0, 0, 0, 0]`: the chip never drove MISO, which a powered, connected TROPIC01 does in every mode (a chip in alarm answers AlarmMode). The halt itself is unchanged. Built --release with bench-adopt-existing-chip (the profile the board ran), flashed with picotool, and read on a Mac: the line above, every two seconds.
The previous commit ran rustfmt over the whole file, which reflowed three lines the change does not touch. They go back as they were, so the change is only the halt's diagnostic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The anchor firmware halted at boot with
[T1] chip id: FAIL (no real identity; halting)and nothing else: the libtropic error was discarded and the raw link probe's MISO bytes were thrown away. It printed once, before any host attached, so a phone saw only a board that accepted its USB connection and never answered (USB write short (-1/6)). Both rig anchors were in that state after the phones were swapped.The halt now prints the library's error and the probe's MISO bytes, and repeats them every two seconds so a late host reads them. The halt itself is unchanged.
Verification
cargo build --release --bin dsm-anchor-pico --features bench-adopt-existing-chip(the profile the board ran; the board's previous 4 MiB flash was saved first).picotool load -xand read on a Mac, every two seconds:[T1] chip id: FAIL (no real identity; halting): ChipBusy; raw probe MISO [0, 0, 0, 0].ChipBusyis libtropic'sl1_readgiving up with the status byte never READY and never ALARM; MISO all zero means the chip never drove the line. A powered, connected TROPIC01 answers its status byte in every mode, so this is power, seating or the MISO/CS wiring, not the chip's counter or slot state.