SNLA465 January   2025 DP83TC817S-Q1 , DP83TC818S-Q1 , DP83TG721S-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1The Role of Time Sensitive Networking in Automotive Applications
  5. 2Generalized Precision Time Protocol Algorithm Overview
    1. 2.1 gPTP Timetamping Handshake Process
  6. 3Methods of Implementing gPTP: Timestamping Location
  7. 4Fixed Latency and Recovered Clock Modes
  8. 5Event Triggers and Monitors
  9. 6Simplified gPTP Integration
  10. 7Conclusion
  11. 8References

gPTP Timetamping Handshake Process

To sync with the PTP leader, the PTP follower must adjust the offset to match the leader. This process is initiated by the follower sending out a peer delay request, pdelay_req, which is timestamped at t1. Then, the leader receives pdelay_req at t2 and responds with a peer delay response, pdelay_resp, at t2’, which the follower receives at t1’. During the handshake, t2’ and t2 are forwarded to the follower. Once timestamps t1, t2, t2’, and t1’ are recorded by the follower, the timestamps can be used to calculate to the offset and path delay to adjust the follower’s wall clock to match the leader’s wall clock using the equation shown in Figure 2-4. Note that the equation for path delay assumes a symmetrical path of travel.

The follower can also adjust the frequency to match the leader. The leader continuously sends out sync messages at t3, which is received by the follower at t4. The succeeding timestamps can be represented as t3’ and t4’ respectively, as shown in Figure 2-4. The frequency drift can be calculated using the equation shown from Figure 2-4. If the ratio is 1, no adjustment is made. If the ratio is 0.9995, each succeeding cycle can be 0.9995 multiplied by the period of the previous cycle.

A follow-up message is also sent to include the time the original sync message was actually transmitted because there is some delay between when the leader initiates the sync messages to when the message is actually sent.

The leader and follower clocks can stay synchronized if each timestamped packet always take the same time to travel across the network. However, in reality, packet travel times vary due to unpredictable delays from the processor and network. This makes synchronization more challenging, but there are ways to address these challenges mentioned in the next few sections.

Note: For applications with more than two processors boundary clocks can be used to distribute the PTP protocol across the network. For more details on how boundary clocks work, see IEEE 1588 Boundary Clock and Transparent Clock Implementation Using the DP83640.