Skip to content

oscillatord: configure SA5x PPS output width - #141

Closed
ahmadexp wants to merge 1 commit into
masterfrom
codex/configure-sa53-pps-width
Closed

ahmadexp wants to merge 1 commit into
masterfrom
codex/configure-sa53-pps-width

Conversation

@ahmadexp

Copy link
Copy Markdown
Collaborator

Summary

  • read the SA5x PpsWidth setting during oscillator initialization
  • set it to the required 80 ms value when it is missing or incorrect
  • add pseudo-terminal regression coverage for both update and no-op paths

Motivation

The repository already lists {set,PpsWidth,80000000} as a minimum required SA53 setting, but oscillatord did not enforce it. On hardware, a missing width caused the Time Card PHC to remain unsynced after boot with a stable offset of hundreds of milliseconds, while GNSS and MAC PPS remained closely aligned.

The setting is applied at daemon startup. It is not stored to EEPROM, avoiding unnecessary flash writes while ensuring every oscillatord run establishes the required output geometry.

Testing

Ran the same Ubuntu 24.04 build used by .github/workflows/oscillatord.yml:

BUILD_TYPE=RelWithDebInfo BUILD_TESTS=ON BUILD_UTILS=ON bash ./tools/build-timecard.sh

100% tests passed, 0 tests failed out of 2

The new test uses a pseudo-terminal SA5x responder and verifies that oscillatord sends {set,PpsWidth,80000000} only when the reported value differs.

@ahmadexp ahmadexp closed this Aug 25, 2026
@ahmadexp
ahmadexp deleted the codex/configure-sa53-pps-width branch August 25, 2026 01:20
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