add around line 40: #include <linux/pps-gpio.h> add /* PPS-GPIO platform data */ static struct pinmux_config pps_pin_mux[] = { {"gpmc_csn2.gpio1_31", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT}, {NULL, 0}, }; static struct pps_gpio_platform_data pps_gpio_info = { .assert_falling_edge = false, .capture_clear= false, .gpio_pin=63, .gpio_label="PPS", }; static struct platform_device pps_gpio_device = { .name = "pps-gpio", .id = -1, .dev = { .platform_data = &pps_gpio_info }, }; static void pps_init(int evm_id, int profile) { int err; setup_pin_mux(pps_pin_mux); err = platform_device_register(&pps_gpio_device); if (err) { pr_warning("Could not register PPS_GPIO device"); } } add the pps_init line /* Beaglebone Rev A3 and after */ static struct evm_dev_cfg beaglebone_dev_cfg[] = { {tps65217_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mii1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {usb1_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {i2c2_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {pps_init, DEV_ON_BASEBOARD, PROFILE_NONE}, {boneleds_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {NULL, 0, 0}, };
# get latest ntp source from [http://www.ntp.org/downloads.html/]. 4.2.6p5 is the production release as of this writing. wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.6p5.tar.gz tar xvzf ntp-4.2.6p5.tar.gz # copy timepps.h into the include directories cp timepps.h ~/ntp-4.2.6p5/include/timpps.h cp timepps.h /usr/include/timepps.h # start configure and make ./configure make sudo make installGetting the right configuration for your GPS in ntp.conf was not intuitive to say the least. If all works out, you could use ntpq -p to see that little 'o' in front of PPS(0) entry indicating it has locked onto the PPS through the specific GPIO pin to get 2us jitter (this table was captured ~5 hours after one bootup more than a year ago):
remote refid st t when poll reach delay offset jitter ============================================================================== *SHM(0) .GPS. 0 l 4 16 377 0.000 -19.922 9.783 oPPS(0) .GPIO. 0 l 2 16 377 0.000 -0.281 0.002 -vhost.cohesivel 128.249.1.10 3 u 50 64 377 56.110 13.134 2.715 -clock01.laca02. 216.119.63.113 2 u 16 64 377 25.002 17.157 1.003 +cheezum.mattnor 129.7.1.66 2 u 20 64 377 57.517 11.404 1.817 +gatekeeper.tss. 173.13.85.5 2 u 31 64 377 39.604 15.033 0.929
Hello,
I'd like to build a NTP Server using PPS signal from a GPS to guarantee the precision. I was wondering if it is possible to use the PPS signal with BeagleBone and NTP daemon. Has anybody ever tried it?
Thanks!
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
George, thank you so much for your answer, I really appreciate it.
I have built NTP servers using PPS signal (Trimble, Garmin, etc) using FreeBSD on regular PCs getting the PPS through serial port (pin 1 - DCD). Once FreeBSD supports PPS natively, recompiling kernel is easy.
I intend to run Debian on my BeagleBoard and reading NMEA sentences through TX/RX serial port and getting PPS through GPIO. Do you think I will have good results?