[LinuxPPS] Problem: only clear edge is detected

Charbonneau, André Andre.Charbonneau at nrc-cnrc.gc.ca
Tue Mar 28 15:16:26 CEST 2023


Hi,
I have a problem with linux pps on one of my system and I don't know what might be happening.

I've setup the udev rules and ldattach service and I the 1PPS input on the DCD pin of the serial port is visible when I run ppstest:

$ 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 0.000000000, sequence: 0 - clear  1679941271.001319474, sequence: 97
source 0 - assert 0.000000000, sequence: 0 - clear  1679941272.001326292, sequence: 98
source 0 - assert 0.000000000, sequence: 0 - clear  1679941273.001330757, sequence: 99
source 0 - assert 0.000000000, sequence: 0 - clear  1679941274.001335713, sequence: 100
source 0 - assert 0.000000000, sequence: 0 - clear  1679941275.001341371, sequence: 101

But as you can see from the output above, *only the clear edge is captured*, not the assert edge.  I looked at the pulse with a scope and the pulse is a positive pulse (leading edge is rising edge), 5.55Vpp.  I don't understand why it would detect the clear edge, but not the assert edge.

I've searched online for a possible explanation of these symptoms but with no success.

Does anyone know what might be the root cause of this or where I should look to troubleshoot this?

Any information on this would be much appreciated.

Setup details:

System: CentOS Linux release 7.9.2009 (Core), kernel 3.10.0-1160.83.1.el7.x86_64
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ldattach script and udev rules shown below:

$ cat /usr/lib/systemd/system/ldattach at .service
[Unit]
Description=1PPS input on /dev/%i
Before=ntpd.service

[Service]
ExecStart=/sbin/ldattach 18 /dev/%i
Type=forking

[Install]
WantedBy=multi-user.target

$ cat /etc/udev/rules.d/09-pps.rules
KERNEL=="pps0", OWNER="root", GROUP="root", MODE="0644"
KERNEL=="ttyS0", RUN+="/bin/setserial -v /dev/%k low_latency irq 4"

Thanks,
  Andre


--
Andre Charbonneau

Frequency & Time
Metrology Research Centre
National Research Council Canada / Government of Canada
andre.charbonneau at nrc-cnrc.gc.ca<mailto:andre.charbonneau at nrc-cnrc.gc.ca> / 613-993-3129

Fréquence et temps
Centre de recherche en métrologie
Conseil national de recherches Canada / Gouvernement du Canada
andre.charbonneau at nrc-cnrc.gc.ca<mailto:andre.charbonneau at nrc-cnrc.gc.ca> / 613-993-3129

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.linuxpps.org/pipermail/discussions/attachments/20230328/08674672/attachment.html>


More information about the discussions mailing list