Open rondaydayup opened 2 years ago
man ptp4l, step_threshold
when the step_threshold is seted 0.001s, if the master time has an abnormal jump 0f 100ms, the slave will sync the time of 0.001s?
When a time jump is detected in the master clock, by default (when step_threshold is 0), ptp4l will try to compensate through frequency adjustment. Obviously this will take a long time, proportional to the time delta. When step_threshold has a non-zero and positive value, ptp4l will still compensate through frequency adjustment on time deltas smaller than step_threshold. When the time delta exceeds the step_threshold, ptp4l will also create a time jump in its local clock, which will bring it in sync much faster to the master.
Excuse me@vladimiroltean,If I do not want to see slave sync it's local clock when master produce a huge jump(since many time sensitive sensor will crash). Is there any way to config a max sync offset to slave?
example:
last cycle: master time: 100ms slave time( sync with master correctly):100ms
next cycle: master time:150ms(produce abnormal jump 50ms)
slave time( can not accept such a huge jump, maximum 1ms):101ms(expected value)
when master jump we consider master is disability, so slave sync time with it's local clock. Is this idea possible? Thanks a lot.
So you want to trigger a BMCA master re-election when the servo's step_threshold is exceeded, and somehow, a different master clock to be chosen next time, based on some undetermined criterion. Interesting, I don't think it is possible, I see that servo.c doesn't trigger any event. You may want to present your use case to linuxptp-users@lists.sourceforge.net. This isn't the official support forum for the project, just a fork.
OK, thanks a lot
Excuse me@vladimiroltean,As orangewsc described the situation, I would say that if the master have a huge jump, can the slave synchronize with a set maximum synchronization amplitude(for compensation)?
As Miroslav Lichvar explains on linuxptp-users, you are probably looking for the max_frequency option, documented in the ptp4l man page: https://sourceforge.net/p/linuxptp/mailman/linuxptp-users/thread/YimtxAqjKKDy3etN%40localhost/#msg37623436
After the time synchronization is stable, if the master clock has an abnormal jump (for example, the time suddenly jumps for 100ms or more), how can the slave side set and recognize this abnormal jump, and synchronize the local time with a maximum amplitude (for example, 1ms) (similar to the maxwrite configuration of Chrony)