Skip to content

oscillatord: configure SA5x PPS output width - #142

Merged
ahmadexp merged 1 commit into
masterfrom
fix/sa53-pps-width
Aug 25, 2026
Merged

ahmadexp merged 1 commit into
masterfrom
fix/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

Copy link
Copy Markdown
Collaborator Author

The standalone oscillatord change is now proposed upstream in Orolia2s/oscillatord#157. This PR can remain as the Time-Card integration until the upstream change is accepted and synchronized.

@ahmadexp
ahmadexp merged commit d2daf40 into master Aug 25, 2026
4 checks passed
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