ddrown / usb-gps Goto Github PK
View Code? Open in Web Editor NEWStratum 1 NTP setup using USB to transfer GPS PPS info
Stratum 1 NTP setup using USB to transfer GPS PPS info
Build environment: summon-arm-toolchain - https://github.com/esden/summon-arm-toolchain.git perl on PC with the perl modules "Inline::C" and "Moose" use "make" to build the STM32F4 code. Flash with st-link utility (I've had the best success with their windows tool) Hardware setup: STM32F4 discovery board Fastrax UP501 GPS some 3.3V power source 20x4 LCD display connected via i2c gpio expander (I used sainsmart's) wire GPS PPS pin to PA1 on the STM32F4 board wire GPS serial to STM32F4's UART: GPS RX=STM32F4 PA2, GPS TX=STM32F4 PA3 wire power of GPS to a 3.3V supply (STM32F4 "3V" is 2.9V, and will not work) connect STM32F4's USB port to PC power STM32F4 via its debug USB port or via the 5V pin wire LCD display to PA8=scl, PC9=sda and use external pull-up resistors to 5V NTP setup: The STM32F4 will show up as /dev/ttyACM0 (or some number other than 0) on the linux host. Check dmesg to see: [697103.547376] usb 2-1.1: Product: STM32 Virtual ComPort in FS Mode [697103.574835] usb 2-1.1: Manufacturer: STMicroelectronics [697103.601224] usb 2-1.1: SerialNumber: 00000000050C [697103.627691] usb 2-1.1: adding 2-1.1:1.0 (config #1, interface 0) [697103.627726] cdc_acm 2-1.1:1.0: This device cannot do calls on its own. It is not a modem. [697103.657570] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device Add to /etc/ntp.conf: server 127.127.28.0 minpoll 4 maxpoll 4 fudge 127.127.28.0 time1 0.000 refid GPS stratum 0 Run as root (from this directory): ./ntp-shm </dev/ttyACM0 Verify NTP is getting data with "ntpq -p": remote refid st t when poll reach delay offset jitter ============================================================================== *SHM(0) .GPS. 0 l 9 16 377 0.000 0.006 0.008 (the reach column should be non-zero, and then "when" column will tell you the time of the last sample) Source code: (stm32f4) start by looking through src/main.c, src/pps.c, src/mytimer.c, src/uart.c (PC) see the file ntp-shm Results: see http://dan.drown.org/stm32/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.