On Mon, Sep 07, 2020 at 02:23:54PM +0530, Jairaj Solanki wrote: > Hello Vladimir, > > Sorry for the wrong debug log. > I processed this log in excel and saved it, that is why it lost the nano > second information. > > Please refer this debug log : > https://drive.google.com/file/d/1bS6_9AOZlcOQVI2_7nY-zqJClZ8IX1Qr/view?usp=sharing > at 1597801630 timestamp. > > I am using a 4.14.78 kernel with ublox gps receiver, I don't have access to > NMEA currently.
This new log says: ts2phc[47236.294]: /dev/ptp1 extts index 0 at 1597801627.000000005 corr 0 src 1597801627.124054367 diff 5 ts2phc[47236.294]: /dev/ptp1 master offset 5 s2 freq +1527 ts2phc[47237.233]: /dev/ptp1 extts index 0 at 1597801628.000000008 corr 0 src 1597801628.62638535 diff 8 ts2phc[47237.233]: /dev/ptp1 master offset 8 s2 freq +1532 ts2phc[47238.704]: /dev/ptp1 extts index 0 at 1597801629.000000006 corr 0 src 1597801630.534159628 diff -999999994 ts2phc[47238.704]: /dev/ptp1 master offset -999999994 s2 freq -32767999 ts2phc[47239.243]: /dev/ptp1 extts index 0 at 1597801630.015516222 corr 0 src 1597801630.72969671 diff 15516222 ts2phc[47239.243]: /dev/ptp1 master offset 15516222 s2 freq +15517748 ts2phc[47240.230]: /dev/ptp1 extts index 0 at 1597801631.002506410 corr 0 src 1597801631.59684682 diff 2506410 ts2phc[47240.230]: /dev/ptp1 master offset 2506410 s2 freq +7162803 The CLOCK_MONOTONIC in the output of ts2phc increments normally. The extts events increment normally. The source timestamp jumps 1.907774278 seconds, then 0.195537082 seconds. That is the problem. The source timestamps are produced by this code: /* * Returns the time on the PPS source device at which the most recent * PPS event was generated. This implementation assumes that the * system time is approximately correct. */ static int ts2phc_generic_master_getppstime(struct ts2phc_master *m, struct timespec *ts) { struct timex ntx; int code; memset(&ntx, 0, sizeof(ntx)); ntx.modes = ADJ_NANO; code = adjtimex(&ntx); if (code == -1) { pr_err("adjtimex failed: %m"); return -1; } ts->tv_sec = ntx.time.tv_sec + ntx.tai; ts->tv_nsec = ntx.time.tv_usec; return 0; } Obviously, the system time is _not_ approximately correct when the time jumps. Can you try to disable NTP and repeat the test? Thanks, -Vladimir _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users