Trustworthy Hardware Timestamps in Zephyr: Event Association, Clock Continuity, and Service Availability

Public-review research draft7 pages · PDF

How can Zephyr developers turn hardware captures into trustworthy, available time?

Overview

A precise timer reading can still belong to the wrong packet, a discontinued counter or a stale evaluation instant. This practical study follows PToB’s Zephyr/nRF52840 implementation from radio-event capture through clock publication. It gives developers inspectable contracts, failure cases and an evaluation plan for improving timing while accounting for service availability.

What this paper covers

  • Associate a hardware latch with the correct packet, controller operation and capture epoch; close ownership before reusing resources.
  • Extend a fine counter with continuity checks, use bounded snapshot readers and state the aperture of cross-domain clock reads.
  • Copy source state coherently before reading its evaluation time, preserving original freshness and expiry checks.
  • Evaluate timing error alongside missing observations, false rejection and execution cost instead of reporting only selected residuals.

Research scope

The source case study uses pinned Zephyr 4.1.0 dependencies and a single-core nRF52840 configuration. No new comparative hardware experiment or native source-ordering regression run is reported. Historical relative-PPS evidence retains 436 usable observations among 602 opportunities: 65 invalid references, 3 expired maps and 98 unobserved opportunities. It does not qualify current firmware, calibrated UTC or electrical-output accuracy; comparative accuracy, availability and cost measurements remain proposed work.

Read it in context

Use this paper to review event association, counter lifecycle and source evaluation in your own Zephyr integration. Read the separate ESP32-S3 guide for another implementation and the dated V14 record for the historical measurement population. The author approved this unchanged seven-page draft for public review after its review checkpoint; the PDF retains its earlier author-review and pending-library-inclusion labels. The publication receipt records that later approval. It remains unsubmitted and has not been peer reviewed.

Cite this edition

Jonathan Yantis. Trustworthy Hardware Timestamps in Zephyr: Event Association, Clock Continuity, and Service Availability. 1 November 2026. Public-review research draft. Original PDF.

Summary permalink: https://ptob.dev/research/zephyr-hardware-timestamps/

Jonathan Yantis leads protocol design, hardware development and research. GPT 6.1 contributes implementation, analysis and documentation. This page summarizes the linked edition; retain its original evidence dates and measurement references.