On May 14, Peter Monta wrote:
So a USB-based GPS should:
- maintain a cycle count of its local crystal oscillator (e.g. with
a timer peripheral)
- report this count when requested
- timestamp PPS edges from the GPS module, and report these timestamps when
requested
I was already tinkering with stuff along these lines, so I threw
together some code that just prints to a USB emulated serial port on
every PPS pulse as well as a simple program on the PC side to
timestamp it. I know this isn't ideal, I just wanted to get a
starting point. My goal is to get the error under 1ms ("NTP" grade
instead of "timenut" grade :).
This is the result (red "bar" of 41k samples), compared to NTP
loopstats info (green line, cable modem connection):
http://dan.drown.org/stm32/run2/time-drift.png
From that picture, you can see that it's around 2ms worth of
inaccuracy. I'm working on adding your recommendations to see if I
can get that number lower.
More info and graphs if anyone's interested:
http://dan.drown.org/stm32/run2.html
_______________________________________________
time-nuts mailing list -- [email protected]
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.