|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/ptp/configuring-ptp.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: CONCEPT |
| 6 | +[id="holdover-in-a-grandmaster-clock_{context}"] |
| 7 | += Holdover in a grandmaster clock with GNSS as the source |
| 8 | + |
| 9 | +Holdover allows the grandmaster (T-GM) clock to maintain synchronization performance when the GNSS source is unavailable. During this period, the T-GM clock relies on its internal oscillator and holdover parameters to reduce timing disruptions. |
| 10 | + |
| 11 | +You can define the holdover behavior by configuring the following holdover parameters in the `PTPConfig` custom resource (CR): |
| 12 | + |
| 13 | +`MaxInSpecOffset`:: Specifies the maximum allowed offset in nanoseconds. If the T-GM clock exceeds the `MaxInSpecOffset` value, it transitions to the `FREERUN` state (clock class state `gm.ClockClass 248`). |
| 14 | +`LocalHoldoverTimeout`:: Specifies the maximum duration, in seconds, for which the T-GM clock remains in the holdover state before transitioning to the `FREERUN` state. |
| 15 | +`LocalMaxHoldoverOffSet`:: Specifies the maximum offset that the T-GM clock can reach during the holdover state in nanoseconds. |
| 16 | + |
| 17 | +If the `MaxInSpecOffset` value is less than the `LocalMaxHoldoverOffset` value, and the T-GM clock exceeds the maximum offset value, the T-GM clock transitions from the holdover state to the `FREERUN` state. |
| 18 | + |
| 19 | +[IMPORTANT] |
| 20 | +==== |
| 21 | +If the `LocalMaxHoldoverOffSet` value is less than the `MaxInSpecOffset` value, the holdover timeout occurs before the clock reaches the maximum offset. To resolve this issue, set the `MaxInSpecOffset` field and the `LocalMaxHoldoverOffset` field to the same value. |
| 22 | +==== |
| 23 | + |
| 24 | +For information about clock class states, see "Grandmaster clock class sync state reference" document. |
| 25 | + |
| 26 | +The T-GM clock uses the holdover parameters `LocalMaxHoldoverOffSet` and `LocalHoldoverTimeout` to calculate the slope. Slope is the rate at which the phase offset changes over time. It is measured in nanoseconds per second, where the set value indicates how much the offset increases over a given time period. |
| 27 | + |
| 28 | +The T-GM clock uses the slope value to predict and compensate for time drift, so reducing timing disruptions during holdover. The T-GM clock uses the following formula to calculate the slope: |
| 29 | + |
| 30 | +* Slope = `localMaxHoldoverOffSet` / `localHoldoverTimeout` |
| 31 | ++ |
| 32 | +For example, if the `LocalHoldOverTimeout` parameter is set to 60 seconds, and the `LocalMaxHoldoverOffset` parameter is set to 3000 nanoseconds, the slope is calculated as follows: |
| 33 | ++ |
| 34 | +Slope = 3000 nanoseconds / 60 seconds = 50 nanoseconds per second |
| 35 | ++ |
| 36 | +The T-GM clock reaches the maximum offset in 60 seconds. |
| 37 | +
|
| 38 | +[NOTE] |
| 39 | +==== |
| 40 | +The phase offset is converted from picoseconds to nanoseconds. As a result, the calculated phase offset during holdover is expressed in nanoseconds per second, and the resulting slope is measured in nanoseconds per second. |
| 41 | +==== |
0 commit comments