IEEE 1588 / PTP on Teensy 4.1

jwhill

Member
I'm using the a Teensy 4.1 to read PTP packets from my grandmaster clock (MasterClock GMR1000). I'm simply looking at each message type and pulling out data as a way to learn PTP. I noticed that when I read any messages that contain the master time (i.e., follow-up message, delay-response message), the timestamp is actually ahead (in the future) of the master by about 30 or 40 seconds. I noticed that my grandmaster has a UTCOffset setting and set to value of "37". Can anyone give me some clues as to what is going on and how to property read the master time? How can I best compensate for the timestamps in the PTP messages not matching the actual master time?
 
PTP uses "TAI" as it's timescale, which has no leapseconds. Time as you're used to it is usually UTC (or some hours offset from there depending on your timezone). UTC is behind TAI by 37 seconds (this can change every 6 months depending on planetary wobbles, if you search "IERS bulletin C" that's where the announcements get made).
 
Back
Top