PPS GPIO support

Hi to all, it's first time I write and I'm not a Linux expert.
I've bought a NanosG20 and I'm waiting to receive it.
I've seen I can create a NTP server using GPS (I've seen this done with Raspberry-Pi): I read NMEA strings through serial port and sync pulse (PPS) connected to GPIO pin.
I know Kernel supports PPS pin connected to GPIO terminal, but I have no idea how to do this: how can I tell the kernel I'm using GPIOxy pin for PPS input?
May anyone help me?

Re: PPS GPIO support

It seems that the PPS support was added in 3.2 (mentioned here https://github.com/raspberrypi/linux/issues/109). By default NanosG20 uses, but you can find a kernel patch for Linux 3.5 here: http://download.armbedded.eu/support/nanosg20/nanosg20-3.5.patch. You still have to modify the file arch/arm/mach-at91/board-nanosg20.c to add the PPS support like described in the first link (replace the pin number). Then enable PPS support in the kernel config and compile the kernel. Finally, put the zImage in the /boot directory of the NanosG20 SD card.

Re: PPS GPIO support

Yesterday I adapted rpi_gpio_ntp to also allow PPS from userspace on a Nanos G20.
This way you don't need to patch and replace the kernel; just run this program and ntp and you're good to go.
I used PB12 which is (from linux point of view) gpio pin 44 (32 + 12, where 32 because PB and 12 is from PB12).

Syndicate content