---
title: "Trustworthy timing in Zephyr — PToB research"
description: "Practical contracts and failure tests for Zephyr developers: associate hardware events, preserve counter continuity and evaluate fresh source data without weakening expiry."
url: "https://ptob.dev/research/zephyr-hardware-timestamps/"
language: "en"
robots: "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"
representations: {"application/json":"https://ptob.dev/research/zephyr-hardware-timestamps/?format=json","text/markdown":"https://ptob.dev/research/zephyr-hardware-timestamps/?format=markdown"}
format_description: "https://ptob.dev/agent-formats.json"
---

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

Public-review research draft  1 November 2026  7 pages · PDF

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

[Read PDF](https://ptob.dev/papers/preview/?file=%2Fpapers%2Fzephyr-hardware-timestamps-20261101.pdf)[Cite this edition](https://ptob.dev/research/zephyr-hardware-timestamps/#citation)

## 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.

[Paper source and companion records](https://github.com/yantisj2/PToB/tree/main/papers/zephyr-timing)[Public-review approval receipt](https://github.com/yantisj2/PToB/blob/main/papers/zephyr-timing/publication.json)[Read the ESP32-S3 implementation guide](https://ptob.dev/research/esp32-s3-event-capture/)[Inspect the historical one-relay evidence](https://ptob.dev/research/#t096-relay)

## 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](https://ptob.dev/papers/preview/?file=%2Fpapers%2Fzephyr-hardware-timestamps-20261101.pdf).

Summary permalink: [https://ptob.dev/research/zephyr-hardware-timestamps/](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.

## The full paper

The original document includes the technical detail and references behind this summary.

[Read PDF](https://ptob.dev/papers/preview/?file=%2Fpapers%2Fzephyr-hardware-timestamps-20261101.pdf)
[Cite this edition](https://ptob.dev/research/zephyr-hardware-timestamps/#citation)

[Paper sources on GitHub](https://github.com/yantisj2/PToB/blob/main/papers/README.md)

## Continue exploring

[Affordable timing from Starlink over WiFi](https://ptob.dev/research/starlink-wifi-timing/)[Low-level timing on ESP32-S3](https://ptob.dev/research/esp32-s3-event-capture/)[BLE timing tails and multipath](https://ptob.dev/research/ble-timing-tails-multipath/)[From BLE to a Pi NTP/PTP gateway](https://ptob.dev/research/pi5-mhat-time-gateway/)[From USB frames to a macOS clock](https://ptob.dev/research/usb-macos-time-transfer/)[Empirical BLE-trained holdover](https://ptob.dev/research/empirical-ble-holdover/)[ESP32-S3 causal clock discipline](https://ptob.dev/research/esp32-s3-causal-clock-discipline/)[Timing information and power scheduling](https://ptob.dev/research/awake-timing-power-scheduling/)[All research & evidence](https://ptob.dev/research/)

## Structured data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "WebSite",
      "@id": "https://ptob.dev/#website",
      "url": "https://ptob.dev/",
      "name": "PToB",
      "alternateName": [
        "Precision Time over BLE",
        "Precision Time over Bluetooth"
      ],
      "description": "Bluetooth and USB software clocks: W12 60.3 ns relative-PPS RMS over 522/600 observations, separate 64 s sampled holdover, and CoreSE diagnostics.",
      "inLanguage": [
        "en",
        "de"
      ],
      "publisher": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      }
    },
    {
      "@type": "Person",
      "@id": "https://ptob.dev/#jonathan-yantis",
      "name": "Jonathan Yantis",
      "url": "https://github.com/yantisj2/PToB/blob/main/CREDITS.md"
    },
    {
      "@type": "Project",
      "@id": "https://ptob.dev/#project",
      "name": "PToB",
      "alternateName": "Precision Time over BLE",
      "url": "https://ptob.dev/",
      "description": "An independent protocol project researching precision time transfer across Bluetooth-enabled microcontrollers and USB clients.",
      "sameAs": "https://github.com/yantisj2/PToB",
      "member": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      },
      "knowsAbout": {
        "@id": "https://ptob.dev/#protocol"
      }
    },
    {
      "@type": "Thing",
      "@id": "https://ptob.dev/#protocol",
      "name": "Precision Time over BLE",
      "alternateName": "PToB",
      "description": "An experimental PTP-inspired protocol proposal for wireless clock synchronization over Bluetooth Low Energy."
    },
    {
      "@type": "WebPage",
      "@id": "https://ptob.dev/research/zephyr-hardware-timestamps/#webpage",
      "url": "https://ptob.dev/research/zephyr-hardware-timestamps/",
      "name": "Trustworthy timing in Zephyr — PToB research",
      "description": "Practical contracts and failure tests for Zephyr developers: associate hardware events, preserve counter continuity and evaluate fresh source data without weakening expiry.",
      "inLanguage": "en",
      "keywords": [
        "Bluetooth clock synchronization",
        "Precision Time over BLE",
        "Implementation & time transfer"
      ],
      "isPartOf": {
        "@id": "https://ptob.dev/#website"
      },
      "author": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      },
      "about": {
        "@id": "https://ptob.dev/#protocol"
      },
      "dateModified": "2026-11-01",
      "image": "https://ptob.dev/social/ptob-timing-v3.jpg",
      "breadcrumb": {
        "@id": "https://ptob.dev/research/zephyr-hardware-timestamps/#breadcrumbs"
      },
      "mainEntity": {
        "@id": "https://ptob.dev/papers/zephyr-hardware-timestamps-20261101.pdf#article"
      }
    },
    {
      "@type": "BreadcrumbList",
      "@id": "https://ptob.dev/research/zephyr-hardware-timestamps/#breadcrumbs",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "PToB",
          "item": "https://ptob.dev/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Bluetooth and Starlink timing research and results",
          "item": "https://ptob.dev/research/"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "Trustworthy timing in Zephyr",
          "item": "https://ptob.dev/research/zephyr-hardware-timestamps/"
        }
      ]
    },
    {
      "@type": "ScholarlyArticle",
      "@id": "https://ptob.dev/papers/zephyr-hardware-timestamps-20261101.pdf#article",
      "url": "https://ptob.dev/research/zephyr-hardware-timestamps/",
      "headline": "Trustworthy Hardware Timestamps in Zephyr: Event Association, Clock Continuity, and Service Availability",
      "name": "Trustworthy Hardware Timestamps in Zephyr: Event Association, Clock Continuity, and Service Availability",
      "description": "Practical contracts and failure tests for Zephyr developers: associate hardware events, preserve counter continuity and evaluate fresh source data without weakening expiry.",
      "author": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      },
      "datePublished": "2026-11-01",
      "dateModified": "2026-11-01",
      "inLanguage": "en",
      "creativeWorkStatus": "Public-review research draft",
      "about": {
        "@id": "https://ptob.dev/#protocol"
      },
      "mainEntityOfPage": {
        "@id": "https://ptob.dev/research/zephyr-hardware-timestamps/#webpage"
      },
      "image": "https://ptob.dev/social/ptob-timing-v3.jpg",
      "encoding": {
        "@type": "MediaObject",
        "contentUrl": "https://ptob.dev/papers/zephyr-hardware-timestamps-20261101.pdf",
        "encodingFormat": "application/pdf"
      },
      "isPartOf": {
        "@id": "https://ptob.dev/research/#webpage"
      }
    }
  ]
}
```
