Skip to content

fix: restart GPS over Qwiic after idle and failed startup - #1607

Merged
timohueser merged 4 commits into
developfrom
codex/gps-startup-1603
Sep 13, 2026
Merged

timohueser merged 4 commits into
developfrom
codex/gps-startup-1603

Conversation

@timohueser

@timohueser timohueser commented Sep 12, 2026

Copy link
Copy Markdown
Owner

The Qwiic prototype has no GPS wake/reset wire. The driver previously requested indefinite backup and tried to resume it with I2C reads, which is not a documented wake source. It also skipped configuration and left a missing-sensor warning when the first boot probe failed.

Use controlled GNSS stop/start over I2C. Both a successful first probe and a later startup response send START before configuration, so an MCU reset can recover a receiver left stopped by its previous session. Idle sends STOP once and parks host polling; resume sends START and applies the existing configuration and tracking mode. These commands retain receiver data, do not expect an ACK, and do not claim backup-level current. The prototype's idle current remains unmeasured. Future real-board GPIO wake support is separate.

The failed first probe is retried at the normal cadence within the existing 150-second acquisition window. One startup warning bundle is published on the first response or at the deadline. Altimeter and compass results are retained. This is historical startup presence, not live availability. Existing per-key configuration ACK logging and power_saver policy remain unchanged.

Related: #1603. Physical transition acceptance passed on 2026-09-13 at 2fd559d2: late module power, idle/resume with advancing GPS epochs, and MCU reset while GNSS was stopped. No position fix was acquired (fix=0, sats=0); these checks verify receiver recovery, not positioning performance or current consumption.

Validation:

  • Independent adversarial review approved the startup correction, command bytes, driver transitions and documentation. The existing NAV-PVT debug log now includes iTOW for physical evidence.
  • ./tools/obc test -p obc-sensors: 30 passed. Corresponding all-target clippy passed.
  • Earlier unchanged platform handoff suite with sensor-link: 44 passed; clippy passed.
  • Workspace and standalone-root formatting, git diff --check, and ./tools/obc suites check: passed (69 suites / 348 units).
  • python3 docs/build_docs.py --check-links: passed. Public architecture copy and the board README changed in a separate docs commit.
  • Final release/resource gates passed at 2fd559d2 with real sensors, no features, and sensor-only debug logging for observable GPS epochs. Linked resident RAM stays 305,664 B; largest guarded poll frame 9,792 B; residual main stack 53,760 B; flat-store frame 9,280 B. The strict-align build check passed. No debug-uart image is used. CI also passed its default-info shipping build, resource baseline and frame gates; all CI jobs have passed in run 34690500936.
  • No snapshot sweep, full local CI mirror or base rebuild was run. Physical verification used the preserved release ELF, with successful full-image read-back verification before testing. One short test ride was finished; existing rides were retained.

The board change replaces the unused PMREQ encoder and speculative DDC wake helper. It adds no dependency, resident buffer, generic sensor framework or future-board flag. The complete PR changes six files, +118/-110 lines including documentation and tests.

Physical verification:

  • Late module power: GPS failed the first boot probe, responded at 27.85 s after Qwiic reconnection, received START and configuration, then produced advancing NAV-PVT epochs. The user confirmed that only the original altimeter and compass warnings remained, with no GPS warning.
  • Idle/resume: STOP at 150.86 s, no NAV-PVT logs while parked, then physical Start ride at 206.38 s and advancing iTOW values (3682200036827000).
  • MCU reset while stopped: after the test ride finished and STOP was logged, only the MCU was reset. GPS power remained connected. Startup sent START and produced fresh advancing epochs (3687200036878000).
  • Two full flash attempts failed read-back verification. A separate check found two mismatched bytes in page 0x00150000. Rewriting that unchanged ELF page with double buffering disabled passed, followed by successful full-image verification. No verification bypass or chip erase was used.
  • No absent-module deadline test, position-fix acceptance, or power-saver/current measurement was run. No source or public documentation changed during physical verification; previously passed host, resource, and CI checks were not repeated.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@timohueser timohueser changed the title fix: configure GPS after a failed startup probe fix: restart GPS over Qwiic after idle and failed startup Sep 12, 2026
@timohueser
timohueser marked this pull request as ready for review September 13, 2026 10:17
@timohueser
timohueser merged commit 2c5c27b into develop Sep 13, 2026
29 checks passed
@timohueser
timohueser deleted the codex/gps-startup-1603 branch September 13, 2026 10:17
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