gPTP / STBM Time Synchronization

Master (Grandmaster) → Slave · IEEE 802.1AS gPTP · AUTOSAR Synchronized Time-Base Manager

Simulation

gPTP timestamping & correction — HW timestamps shown on the node that captures them

🛰️
Domain Master
--:--:--.---
0 ms
Grandmaster
Master HW timestamps
t₁preciseOriginTimestamp — Sync egress
t₂Pdelay_Req ingress
t₃Pdelay_Resp egress
ccorrectionField — residence time
📡
Slave UNSYNCHRONIZED
--:--:--.---
0 ms
STBM sync time—
HW RX timestamp—
Poll notify delay—
timeLeap status—
Slave HW timestamps
t₁Pdelay_Req egress
t₂Sync ingress — MAC HW ts
t₄Pdelay_Resp ingress
Δppoll notify delay — RX poll + bus load

Timestamp values — master & slave timers counting up

Time view: 4.0 s
master timer slave timer received master ts (Sync/Follow_Up) sync applied sync rejected

Event log

Slave calculation

① Peer path delay (slave-computed)
δ meanPathDelay = ((t₄ − t₁) − (t₃ − t₂)) / 2
—
—
② Offset from master
offsetFromMaster = t₂ − t₁ − δ − c − Δp
—
—
—
—
Deviation (slave − master) 0.000 ms
gPTP accuracy (±500 µs) — within target
Plausibility window (6.25%) — since last sync
Cycle-to-cycle jitter 0.000 ms limit < 1 ms
rateRatio (master / slave) — frequency servo
Sim time 0 ms 0 syncs

Clock deviation over time

slave − master ±500 µs accuracy 6.25% plausibility envelope sync applied sync rejected

Timer counts (oscillator ticks) — slope = clock frequency

master timer count slave timer count same frequency → same slope

Feedback & community

Spotted a bug, have an idea, or want to discuss a gPTP / STBM concept? Jump in below — every comment, question, and feature request is welcome.

💬 Start a Discussion 🐛 Report a bug / request a feature ⭐ Star on GitHub

Leave a comment