Skip to content

Conversation

@glopesdev
Copy link
Collaborator

This PR builds on top of and supersedes #61 by restructuring the synchronization clock protocol specification to improve wording and consistency with other spec documents.

  • Improved specification of synchronization clock protocol
  • Adopt requirement key words from RFC 2119
  • Reorganize document sections for consistency and improve wording
  • Add explicit transmission packet diagram
  • Add schematics for sender / receiver
  • Add logic analyzer trace

Closes #155

@glopesdev glopesdev added the documentation Improvements or additions to documentation label Nov 15, 2025
@glopesdev
Copy link
Collaborator Author

glopesdev commented Nov 15, 2025

@filcarv @Poofjunior @artursilva0 @bruno-f-cruz I have decided to try and tidy up the synchronization clock protocol to fit within the style of all the other specs.

Specifically, I continue to have questions about how best to represent little-endian byte ordering (right-to-left or left-to-right, indices are correct and consistent with R_VERSION, but reading intuition might not be and is flipped to how we present bit structures in the binary protocol spec). Let me know your thoughts on this and everything else.

@filcarv @Poofjunior I have grouped both the oscilloscope and the logic analyzer trace in the same section, let me know of thoughts and/or whether you would prefer to see both, or just one or the other, or keep them separate (and if so, in which section).

@Poofjunior On the example schematic for the audio jack connector for Harp synchronization signal (ESD protected with TVS diode) provided with the pico template, I was wondering if it might make sense to transfer a copy of that specific schematic to this repository for now, so we could reference it locally as in the other files and make the final distribution self-contained?

* Improved specification of synchronization clock protocol
* Adopt requirement key words from RFC 2119
* Reorganize document sections for consistency and improve wording
* Add explicit transmission packet diagram
This is to clarify the initial alignment should be done as fast as
possible, and synchronization must thereafter be kept.

Transmission of the last byte MUST start exactly 672 μs before the current second lapses.

Receivers MUST align their clocks so the next whole second starts exactly 672 μs following reception of the last byte, ensuring any fractional part of the timestamp is zero. Receivers SHOULD complete the initial alignment over as few transmission events as possible, and thereafter MUST keep updating the whole second in sync with successfully transmitted Harp Synchronization Clock messages as long as the whole second is incremented sequentially.
Copy link
Collaborator Author

@glopesdev glopesdev Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@filcarv @Poofjunior @bruno-f-cruz I improved the description of how the clock alignment process is expected to unfold from the point of view of the receiver to try and capture both flexibility in implementation and synchronization expectations. I am not sure how well this reflects the exact implementation details of each of the cores, so would be great to have some feedback before merging.

We could also say here something about the minimum requirements for alignment jitter, but for that we should probably wait until we have some clear official benchmarking process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide complete clock synchronization protocol specification

3 participants