Menu

Drift up to a half second.

Help
2016-05-11
2016-05-11
  • JetsoftDev.com

    JetsoftDev.com - 2016-05-11

    Hi All,

    I have PTPD2 running as a slave on a real time Ubuntu Atom computer connectect to a another type of system with master clock. It will sync and change the time just find but immediately begins to drift. One the drift amount between to two clocks gets up to about a half second which takes a number of minutes, PTPD2 adjusts the clock and the process starts all over a again.

    In the example below the clocks where about a 189ms or so off.

    I know there is some setting that I missing but I have gone throught and I tried much from the help page setting without effect.

    Any ideas?

    Glen

    **root@HostTrafficControl:/media/root/50525724-8f9c-4b14-b987-aef300017bb3/src/rscon/RsConMain# ../scripts/SyncPtpTime.sh
    ptpd2: no process found
    2016-05-12 15:33:22.441861 ptpd2[5277].startup (info) () Configuration OK
    2016-05-12 15:33:22.443672 ptpd2[5277].startup (info) (
    ) Successfully acquired lock on /var/run/ptpd2.lock
    2016-05-12 15:33:22.444627 ptpd2[5277].startup (notice) () PTPDv2 started successfully on ens2 using "slaveonly" preset (PID 5277)
    2016-05-12 15:33:22.445285 ptpd2[5277].startup (info) (
    ) TimingService.PTP0: PTP service init

    Timestamp, State, Clock ID, One Way Delay, Offset From Master, Slave to Master, Master to Slave, Observed Drift, Last packet Received, One Way Delay Mean, One Way Delay Std Dev, Offset From Master Mean, Offset From Master Std Dev, Observed Drift Mean, Observed Drift Std Dev, raw delayMS, raw delaySM

    2016-05-12 15:33:22.446135, init,
    2016-05-12 15:33:22.448530 ptpd2[5277].ens2 (info) (init) Observed_drift loaded from kernel: 500000 ppb
    2016-05-12 15:33:22.556654 ptpd2[5277].ens2 (notice) (lstn_init) Now in state: PTP_LISTENING
    2016-05-12 15:33:22.556744, lstn_init, 1
    2016-05-12 15:33:23.025691 ptpd2[5277].ens2 (info) (lstn_init) New best master selected: 0000bcfffecd2417(unknown)/1
    2016-05-12 15:33:23.025803 ptpd2[5277].ens2 (notice) (slv) Now in state: PTP_SLAVE, Best master: 0000bcfffecd2417(unknown)/1 (IPv4:192.167.1.150)
    2016-05-12 15:33:23.025850, slv, 0000bcfffecd2417(unknown)/1, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 500000.000000000, I, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.000000000, 0.000000000
    2016-05-12 15:33:23.025945 ptpd2[5277].ens2 (notice) (slv) Received first Sync from Master
    2016-05-12 15:33:23.035035, slv, 0000bcfffecd2417(unknown)/1, 0.000000000, 0.094339004, 0.000000000, 0.188678008, 500000.000000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.188685423, 0.000000000
    2016-05-12 15:33:24.035520, slv, 0000bcfffecd2417(unknown)/1, 0.000000000, 0.188936766, 0.000000000, 0.189195524, 500000.000000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.189202869, 0.000000000
    2016-05-12 15:33:24.035637 ptpd2[5277].ens2 (notice) (slv) Servo: Going to slew the clock with the maximum frequency adjustment
    2016-05-12 15:33:24.037417, slv, 0000bcfffecd2417(unknown)/1, 0.000012612, 0.188936766, -0.189137707, 0.189195524, 500000.000000000, D, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.189202869, -0.189137707
    2016-05-12 15:33:24.037518 ptpd2[5277].ens2 (notice) (slv) Received first Delay Response from Master
    2016-05-12 15:33:24.037558 ptpd2[5277].ens2 (notice) (slv) Received new Delay Request interval 5 from Master (was: 0)
    2016-05-12 15:33:24.513508, slv, 0000bcfffecd2417(unknown)/1, 0.000012612, 0.188936766, -0.189376072, 0.189195524, 500000.000000000, D, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.189202869, -0.189376072
    2016-05-12 15:33:25.036055, slv, 0000bcfffecd2417(unknown)/1, 0.000012612, 0.189447353, -0.189376072, 0.189711794, 500000.000000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.189719199, -0.189376072
    2016-05-12 15:33:26.036561, slv, 0000bcfffecd2417(unknown)/1, 0.000012612, 0.189960653, -0.189376072, 0.190234737, 500000.000000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.190242117, -0.189376072
    2016-05-12 15:33:27.037078, slv, 0000bcfffecd2417(unknown)/1, 0.000012612, 0.190479699, -0.189376072, 0.190749886, 500000.000000000, S, 0.000000000, 0, 0.000000000, 0, 0, 0, 0.190757361, -0.189376072
    ^C2016-05-12 15:33:27.697063 ptpd2[5277].ens2 (info) (slv) TimingService: Timing domain shutting down
    2016-05-12 15:33:27.697253 ptpd2[5277].ens2 (info) (slv) TimingService.PTP0: PTP service shutdown
    2016-05-12 15:33:27.697399, dsbl,
    2016-05-12 15:33:27.697918 ptpd2[5277].ens2 (notice) (_) Shutdown on close signal**

     
  • JetsoftDev.com

    JetsoftDev.com - 2016-05-11

    I have some more information. I went and edited the maximimum of clock:max_offset_ppm to 5000 (2000 was probably enough) which allow it to slew downwards and eventaully stabilizes after a large opening reset/step adjusment. It them jumps around in about a +-25us range is is good enough for my needs for now.

    I still think I should be able to make it step for numbers smaller than a half second.

    My current thinking is that this Intel Adam box does not have a HPET and gains a approx a second per 5 minutes vesus the master. (Seems like a lot of drift).

     

Log in to post a comment.