STM32F4 time experiments

other runs

Goal

1ms or better accuracy on a USB-connected GPS.

Hardware

stm32f4 discovery board using a 10.5mhz internal timer is measuring the PPS interval from a Fastrax UP501 GPS reciever (claims "+/- 50 ns (RMS) accuracy"). The stm32f4 is connected via full-speed usb to a pc

Changes from Run 2

The microcontroller's timer is now sampled on USB poll, instead of saving a buffered copy

Graphs

USB offset compared to NTP

This compares NTP's local clock offset (from loopstats) to the GPS timestamps. Since the NTP timestamps will always be offset from the actual time due to how my internet connection works, I've shifted NTP's time by 2.5ms

Overall conclusion

This change lowered the window between the actual time and the PC's reception of it from 2ms wide to under 500µs wide.