This repository has been archived by the owner. It is now read-only.
Deprecated: Compiled kernel image and modules with PPS over GPIO pin 23 added
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
modules/3.1.9adafruit-pps+
README.md
kernel.img

README.md

adafruit-raspberrypi-linux-pps

Update: 2015/02/09

Please note that this kernel is woefully out of date. Don't use it.

Your Raspberry Pi B+ and RPi2 will shed tears (not work), and you'll just want to break things (and me).

I'll get a proper kernel going sooner or later, but consider this archived.

Intro

Kernel image and modules with PPS-GPIO added (this tracks Adafruit's current Occidentalis kernel version and will probably be rebuilt when they next update). This will allow you to use PPS with NTP on a Raspberry Pi.

This repository is used as a part of this article, so check that out for help.

For source modifications, please see this page, branch: ppsgpio for the source this is based on.

Installation

To install this kernel, copy kernel.img to boot:

$ sudo su
# mv /boot/kernel.img /boot/kernel.img.orig
# mv kernel.img /boot/

Copy the modules:

# mv modules/* /lib/modules

Add the pps-gpio module to /etc/modules:

# echo "pps-gpio" >> /etc/modules

Reboot:

# reboot

Once your system is back up, check to see that the kernel version has changed and that pps-gpio loaded:

$ uname -a
Linux raspberrypi 3.1.9adafruit-pps+ #21 PREEMPT Sun Sep 2 10:57:58 PDT 2012 armv6l GNU/Linux
$ dmesg | grep pps
[ .. snip .. ]
[   10.339448] pps pps0: new PPS source pps-gpio.-1
[   10.341591] pps pps0: Registered IRQ 108 as PPS source

PPS input will be available on pin 23 of the Raspberry Pi header.

Note: Ensure that your GPS unit's PPS output is 3.3v friendly!

If you're looking for a unit which fulfills this requirement, Adafruit's Ultimate GPS (all versions) has a 1PPS output which is around ~2.8V, and is compatible with the Raspberry Pi.

Once connected, install pps-tools to test:

$ sudo aptitude install pps-tools
[ .. snip .. ]
Unpacking pps-tools (from .../pps-tools_0.20120406+g0deb9c7e-2_armhf.deb) ...
Processing triggers for man-db ...
Setting up pps-tools (0.20120406+g0deb9c7e-2) ..

Assuming that the pps line is on /dev/pps0:

$ sudo ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert [....], sequence: [....] - clear  [....], sequence: [....]

If your output looks something like the above (brackets are numbers removed for clarity), you're all set. If not, verify that everything is connected and that the pps-gpio kernel module is loaded (along with the -pps kernel itself).

It may be helpful to scope the PPS line to see if the GPS module is actually sending a signal. On some units, the 1PPS output only becomes active after a fix.

Credits

All of these modifications were cobbled together by reading this thread and following its instructions.

See this repository, (branch: ppsgpio) for source code.