frankwayne
Posts: 3
Joined: Mon Oct 09, 2017 11:12 pm
Location: America/Chicago

Are multiple pps-gpio overlays possible?

Mon Oct 09, 2017 11:28 pm

Can I use pps-gpio twice if I have two 1PPS sources? For example, in config.txt:

Code: Select all

dtoverlay=pps-gpio,gpiopin=17
dtoverlay=pps-gpio,gpiopin=18
Has anyone tried to do this and use both PPS sources for NTPD?

Frank

beta-tester
Posts: 1153
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Are multiple pps-gpio overlays possible?

Tue Oct 10, 2017 8:04 pm

that's a very interesting question.
i hope somebody can answer the overlay / config.txt question.ntpd and chrony are able to use different PPS sources.
when it should work, then the kernel has to give them two different PPS devices. for example:
/dev/pps0
/dev/pps1

then in ntp.conf they should be accessable like:

Code: Select all

# http://doc.ntp.org/current-stable/drivers/driver22.html
# /dev/pps0
server  127.127.22.0
fudge   127.127.22.0  refid PPS0

#/dev/pps1
server  127.127.22.1
fudge   127.127.22.1  refid PPS1

or in chrony:

Code: Select all

# https://chrony.tuxfamily.org/documentation.html
refclock  PPS /dev/pps0  refid PPS0
refclock  PPS /dev/pps1  refid PPS1
EDIT: i tried to add those two pps_gpio entries to the config.txt file, but the kernel only created one /dev/pps0 device.
i don't know how to force the kernel to create a second pps device.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)

frankwayne
Posts: 3
Joined: Mon Oct 09, 2017 11:12 pm
Location: America/Chicago

Re: Are multiple pps-gpio overlays possible?

Fri Oct 13, 2017 2:55 am

Thank you for looking into it. I've tried to do it on Stretch and got the same result -- only one PPS device, /dev/pps0. The scant documentation I could find on pps-gpio doesn't help.

Anyone got any ideas?

Frank

beta-tester
Posts: 1153
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Are multiple pps-gpio overlays possible?

Fri Oct 13, 2017 7:20 am

what are your two time sources?
GPS + PPS and RF-clock similar with DCF77?
(i don't know if, there where you are/live, a similar system exists)

do you want to use two PPS for failsafe or for increasing accuracy?

is your serial port of the GPIO connector in use?
i found that, where the serial port is mis-used to receive (non-standard-serial-conform) the time signal of the DCF77 module.
(de) - Raspberry Pi und DCF77 Empfänger von Conrad
(en*) - Raspberry Pi and DCF77 receivers from Conrad
and
(de) - Raspberry Pi als Funkuhr und NTP-Stratum-1-Zeitserver
(en*) - Raspberry Pi as radio clock and NTP Stratum 1 time server
*) translated version

then take a closer look to the Generic Reference Driver (8) of ntpd, maybe there is something you can use.
Generic Reference Driver (8)

or, if you have more than one RPi, then use them, where each is using one PPS-gpio and combine them via network:

should be ok when you combine those two stratum1 servers in the consuming clients
stratum1.server1(atom controlled) + stratum1.server2(rf controlled) ==> stratum2.client(n)

also for failsafe reason a construction of two different RPis would make more sense.
you can turn off one for maintain reason and the other is still working as time reference.
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)

frankwayne
Posts: 3
Joined: Mon Oct 09, 2017 11:12 pm
Location: America/Chicago

Re: Are multiple pps-gpio overlays possible?

Mon Dec 04, 2017 4:39 pm

Danke nochmal.

I already have two Raspberry Pis, each with its own satelite receiver, using PPS. Making it work is not a problem.

I want to attach two receivers to a single Raspberry Pi for reasons that are purely academic. It seems to me that this should be possible, I just don't see how to load the PPS driver for two seperate sources on the Raspberry Pi.

Frank

beta-tester
Posts: 1153
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Are multiple pps-gpio overlays possible?

Tue Dec 05, 2017 7:54 am

maybe the module of RPi isn't able to provide more than one pps-gpio.

did you found out, who is responsable for the pps-gpio overlay?
maybe Noralf Trønnes aka notro
https://github.com/raspberrypi/linux/bl ... verlay.dts

did you asked already in the debian/linux/kernel community how it will work in general in linux to enable multiple /dev/ppsX devices?
{ I only give negative feedback }
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)

Return to “Raspbian”

Who is online

Users browsing this forum: MrWhiter, Yahoo [Bot] and 15 guests