In kernel configuration, it says “PPS clients support”
<M> PPS support
[ ] Use low level IRQ timestamps
[ ] PPS debugging messages
*** PPS clients support ***
<M> Kernel timer client (Testing client, use for debug)
<M> PPS line discipline
[ ] Parallel printer support
With new kernel and pps-tools, I got output like:
$ 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 1186592699.388832443, sequence: 364 - clear 0.000000000, sequence: 0
source 0 - assert 1186592700.388931295, sequence: 365 - clear 0.000000000, sequence: 0
source 0 - assert 1186592701.389032765, sequence: 366 - clear 0.000000000, sequence: 0
I believe “/dev/pps0” is triggered by kernel timer (ktimer), properly configured external 1PPS input should appear as “/dev/pps1”.
In this link, it seems dtb need to be modified to have GPIO work as PPS input:
compatible = "pps-gpio";
gpios = <&gpio1 1 0>;
I’m not sure how to modify TX1 dts file to use pin 13 of J21 for PPS input.
I could also use CTS pin of UART, when I tried:
“ldattach PPS /dev/ttyTHS2” I got “/dev/pps1” created but “sudo ppstest /dev/pps1” produced timeout.
I tried to use tty_ioctl to test RST/CST pins of UART (/dev/ttytTHS2) but they do not seem to work.
“/dev/ttytTHS2” did work for GPS serial data, but not 1PPS.