Discussion:
[Linuxptp-users] Fast reset after detection of a port's fault
Joerg Christian (LWE)
2017-03-07 07:57:46 UTC
Permalink
I have implemented time synchronization with ptp4l using software timestamping.
My requirement is to sync the slaves very fast after the master clock steps.
How can I make the slaves step immediately after they recognize a step of the master clock?

I tried this config file for the slave:

[global]
verbose 1
time_stamping software
slaveOnly 1
step_threshold 0.001
first_step_threshold 0.00001
fault_reset_interval -128

[eth0.2]

When I stepped the master clock I had this result on the slave, no matter what value I use for
fault_reset_interval. I have always the s0 for 16 seconds.

ptp4l[20016.779]: master offset -838788 s2 freq -77766 path delay 37419
ptp4l[20017.778]: master offset -1251433 s0 freq -77766 path delay 37419
ptp4l[20017.779]: port 1: SLAVE to UNCALIBRATED on SYNCHRONIZATION_FAULT
ptp4l[20018.778]: master offset -1669199 s0 freq -77766 path delay 37454
ptp4l[20019.778]: master offset -2119251 s0 freq -77766 path delay 73117
ptp4l[20020.777]: master offset -2544222 s0 freq -77766 path delay 81722
ptp4l[20021.777]: master offset -2959934 s0 freq -77766 path delay 86377
ptp4l[20022.777]: master offset -3370656 s0 freq -77766 path delay 86377
ptp4l[20023.776]: master offset -3827576 s0 freq -77766 path delay 126573
ptp4l[20024.776]: master offset -4256688 s0 freq -77766 path delay 174966
ptp4l[20025.776]: master offset -4702737 s0 freq -77766 path delay 174966
ptp4l[20026.775]: master offset -5128022 s0 freq -77766 path delay 180869
ptp4l[20027.775]: master offset -5539745 s0 freq -77766 path delay 180869
ptp4l[20028.775]: master offset -5926680 s0 freq -77766 path delay 150756
ptp4l[20029.774]: master offset -6337803 s0 freq -77766 path delay 148828
ptp4l[20030.774]: master offset -6754509 s0 freq -77766 path delay 148828
ptp4l[20031.774]: master offset -7167231 s0 freq -77766 path delay 148828
ptp4l[20032.773]: master offset -7584545 s0 freq -77766 path delay 150756
ptp4l[20033.773]: master offset -7977596 s0 freq -77766 path delay 150756
ptp4l[20034.773]: master offset -8410324 s1 freq -415350 path delay 150756
ptp4l[20036.773]: master offset -158698 s2 freq -431379 path delay 145125
ptp4l[20036.773]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[20037.773]: master offset -217699 s2 freq -437496 path delay 145125
ptp4l[20038.773]: master offset -242286 s2 freq -440197 path delay 118919

Regards

Christian
---
b2bemail4liebherr
Miroslav Lichvar
2017-03-07 08:37:08 UTC
Permalink
Post by Joerg Christian (LWE)
When I stepped the master clock I had this result on the slave, no matter what value I use for
fault_reset_interval. I have always the s0 for 16 seconds.
It's not related to the fault reset interval. In the s0 state the PI
servo is measuring frequency of the clock and the length of the
interval is inversely proportional to the I constant. If you need to
reduce the interval, you can use a larger I constant, or use a
different servo.
--
Miroslav Lichvar
Joerg Christian (LWE)
2017-03-09 07:30:35 UTC
Permalink
Sent: Tuesday, March 07, 2017 9:37 AM
Post by Joerg Christian (LWE)
When I stepped the master clock I had this result on the slave, no
matter what value I use for fault_reset_interval. I have always the s0 for 16
seconds.
It's not related to the fault reset interval. In the s0 state the PI servo is measuring
frequency of the clock and the length of the interval is inversely proportional to
the I constant. If you need to reduce the interval, you can use a larger I constant,
or use a different servo.
OK, that makes sense.
I now tested the servos pi, linreg, ntpshm and nullf.
What I need would be a mix of nullf and pi/linreg.
When the deviation is smaller than the step_threshold change the clock frequency.
When the deviation is bigger than the step_threshold go immediately to s1 and step the clock.

Are there other servos available than the above mentioned?

Continue reading on narkive:
Loading...