Wow, nice work on the NTPD server using GPS and 1088. I haven't quite figured out all the components, but I boldly reconfigured my sparkfun GPS to run at 115200 baud and emit ZDA sentences. (I did manage to screw that up by getting the GPS into binary mode, then i had to find the binary data that would put it back in ASCII/NMEA mode ... sigh). I think it's running on my T4.1 with GPS Tx to pin 0 and GPS PPS to pin 35.
Code:
Ethernet 1588 NTP Server
------------------------
netif status changed: ip 192.168.1.19, mask 255.255.255.0, gw 192.168.1.1
waiting for link
enet link status: up
S 56627443 3802693683
81627251 0.000007680 0.000007680 0.000000000 8455 3802693684
106627058 -0.000001510 0.000007700 0.166664958 7555 3802693685
131626865 -0.000001107 0.000007720 0.750002265 7614 3802693686
156626672 -0.000001016 0.000007720 0.800003231 7622 3802693687
181626480 -0.000000960 0.000007710 0.593748987 7617 3802693688
206626287 -0.000000855 0.000007710 0.607158124 7626 3802693689
231626095 -0.000000803 0.000007707 0.875059485 7627 3802693690
256625902 -0.000000710 0.000007707 0.888899207 7636 3802693691
281625710 -0.000000668 0.000007704 1.199987769 7637 3802693692
...
eticks offset drift chisq drift secs
3338400888 -0.000000000 0.000007958 1.893251061 7958 3802771912
3388400490 0.000000006 0.000007958 1.517588139 7958 3802771914
3463399893 0.000000013 0.000007958 1.293152332 7959 3802771917
3538399296 0.000000018 0.000007958 1.258479357 7959 3802771920
3613398699 0.000000022 0.000007958 1.313638568 7960 3802771923
3688398102 0.000000025 0.000007958 1.611920714 7960 3802771926
3813397108 -0.000000013 0.000007958 1.605589628 7956 3802771931
3863396710 -0.000000004 0.000007958 1.631969333 7957 3802771933
3963395915 -0.000000030 0.000007958 2.179639101 7954 3802771937
...
I assume the 2nd column is offset between GPS clock and T41 clock, your first and third graphs above. How do i get data to reproduce your frequency offset plot. I have a GPS PPS sketch using the GPT timer that lets me measure T4.1 crystal drift for either 24MHz crystal or 32KHz RTC crystal, so I know what ppm to expect (-8.1 ppm).
Should your ntpd sketch not respond to NTP queries? I have a simple (old NTP v1) ubuntu C program that does an ntp query, but I get no reply from T4.1. I can ping the T4.1, and with tcpdump I can see the UDP ntp query packet go out on the wire, but no response. I haven't tried adding the T4.1 as an NTP server to /etc/ntp.conf on my ubuntu box.
Just an observation (not your problem), the sparkfun GPS is supposed to flash its LED with a good GPS lock, but with the T4.1 running the NTP/GPS server, it sometimes stops blinking for a while. The GPS is still emitting NMEA but it may be using its internal clock ? I actually had one mbed eval board (NUCLEO F446RE) that would never work with that GPS, because of high frequency interference maybe?? Any how it looks like the T4.1 running native ethernet affects GPS signal ???
i don't have a way to test 1088 with other boxes.
EDIT 1: i added the T41 host as a server to ntp.conf and that appears to be working
Code:
12:52:57.041744 IP 192.168.1.10.123 > 192.168.1.19.123: NTPv4, Client, length 48
12:52:57.041991 IP 192.168.1.19.123 > 192.168.1.10.123: NTPv4, Server, length 48
12:54:01.041860 IP 192.168.1.10.123 > 192.168.1.19.123: NTPv4, Client, length 48
12:54:01.041984 IP 192.168.1.19.123 > 192.168.1.10.123: NTPv4, Server, length 48
ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
manitou .CDMA. 1 u 37 64 17 0.493 2.413 0.132
*192.168.1.19 .PPS. 1 u 37 64 17 0.200 2.423 0.182
Using sntp 192.168.1.19 to query the T41 works
2020-07-02 13:05:09.845665 (+0500) -0.001066 +/- 0.000726 192.168.1.19 s1 no-leap
EDIT 2:
offset of GPS clock to disciplined T4.1 clock (1088 ether clock, 25MHz)
