Skip to content

V2 bring-up: loop watchdog, no-carrier fast path, boot banner - #121

Merged
thePunderWoman merged 1 commit into
mainfrom
firmware-v2-bringup
Nov 20, 2026
Merged

thePunderWoman merged 1 commit into
mainfrom
firmware-v2-bringup

Conversation

@thePunderWoman

Copy link
Copy Markdown
Member

Gets the firmware ready for the first V2 bench bring-up.

I audited the V2 pin map in include/pin_assignment.h against the netlist in PCB/v2.x/snips/stackup/board.kdl, and every GPIO matches. I also checked the IMU mounting against U_IMU1's placement (B.Cu, -90°), and it matches ImuMountings::kV2. The stick orientation and the VSYS divider are the same as V1. The changes below fill the gaps that review turned up.

Changes

  • Loop watchdog. enableLoopWDT() runs at the end of setup(). The core's sdkconfig sets a 5 s timeout with panic, so a hang reboots the board. V2 has no reset button and RXD0's pull-up holds the latch, so without the watchdog a hung board stays on until USB and the battery are pulled. It is turned off before the shutdown spin, because the rail stays up while the power button is held, and a watchdog reset there would re-latch the board.
  • hang serial command. Typing hang stops the loop so the README's watchdog check can be run. The parser is a pure SerialCommandReader with unit tests.
  • No-carrier fast path. XbeeLink::ready() was added, and XbeeUart returns false when no carrier is found. Before, every AT command waited out its 200 ms timeout, so the once-a-second RSSI query froze buttons, stick and menu for 200 ms every second. Regression test added.
  • Boot banner. The boot log now starts with Snips Controller V2, firmware <commit>, reset: <reason>.
  • V2 README. The bring-up steps name the build command and the hang check. VSYS sense is now correctly listed as IO10, not IO7. The stale "firmware still needs UART" note is gone.

Testing

  • pio run -e esp32s3_v2 and pio run -e esp32s3: both build.
  • pio test -e native: 481 passed.
  • gcovr line coverage: 98.8%. serial_command.cpp is at 100%.
  • Not yet run on hardware. Bring-up follows PCB/v2.x/snips/README.md.

🤖 Generated with Claude Code

- Start the Arduino loop watchdog (5 s, panics and reboots) at the end of
  setup(), and stop it before the shutdown spin so a held power button
  can't let a watchdog reset re-latch the board. V2 has no reset button
  and RXD0's pull-up holds the latch, so a hung board otherwise stays on.
- A "hang" line on the serial monitor stops the loop, for the README's
  watchdog check (pure SerialCommandReader, tested).
- XbeeLink::ready(): with no V2 carrier, AT commands now fail at once
  instead of waiting out 200 ms, which froze loop() every second on the
  RSSI query. Regression test added.
- Boot log prints the board, firmware version and reset reason.
- V2 README: bring-up steps name the build and the hang check; VSYS
  sense is IO10, not IO7; drop the stale "firmware still needs UART" note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thePunderWoman
thePunderWoman merged commit c16e349 into main Nov 20, 2026
4 checks passed
@thePunderWoman
thePunderWoman deleted the firmware-v2-bringup branch November 20, 2026 23:10
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.

1 participant