I’m trying to timesync Xavier with a GPS timeserver using chrony and gpsd. I connect my gps to the UART port of the Xavier and use CTS pin to also connect pps to Xavier. But when I run gpsd, I get the error: kernel PPS unavailable.
I found that for TX2 there was a kernel patch that fixed this problem, but couldn’t find anything for Xavier since it is new.
And what pin should I use for PPS? I am currently using Clear to Send on UART (PIN 36). But base on working pins used on TX1 and TX2 I don’t think this is the right pin to use!
My understanding is that I should use a free GPIO that’s connected to a hardware interrupt. The working pins that we previously used for connecting PPS for TX1 is: GPIO8_ALS_PROX_INT and GPIO9_MOTION_INT for TX2
You’ll find information in the Documentation download for the particular release you use. That information shows cross compile on a PC host. Install steps depend on the particular release, the Documentation mentions this part.
In your case you might want to adapt this topic and build just the relevant module:
You’ll find the Xavier “uname -r” is probably “4.9.108-tegra”, meaning a 4.9.108 version with “-tegra” as CONFIG_LOCALVERSION (see that URL). Useful when adding a new driver as a module. Your L4T release (see “head -n 1 /etc/nv_tegra_release”) will probably be R31.1 if you’ve flashed, or R31.0.1 if you have not (and I recommend not using old versions).
The Documentation will mention a PINMUX spreadsheet…use that for assigning GPIO pin functions. A driver won’t be able to take advantage of a GPIO for your purpose unless it is assigned to be what you want it to be…which PINMUX accomplishes.
Because procedures for installing various features have changed over time the first thing you should do is verify that the changes you made were actually installed. To verify “CONFIG_PPS_CLIENT_GPIO” examine the output from this:
To verify any device tree changes made their way in you can reverse compile the device tree on the running system and compare to your changes. This will produce a copy of what the system is actually running for device tree:
The content you see in “/sys” is a direct result of various drivers and is not real file content. If the driver is missing, or if something tells the driver to not load, then no content will exist in “/sys”. So what we now know is that one or more of the following is true:
The driver does not exist. One example is that the driver is in module format, but the module is not in the correct location. What is your "uname -r"? If you used module format, is the module somewhere in "/lib/modules/$(uname -r)/"?
The driver parameters (possibly device tree parameters) are in error or are missing and the driver cannot create the file in "/sys".
The hardware is not visible to the driver, and thus would not know to load. One example of this might be hardware needing external power but the power is not on at the time of driver load. Another example might be that the driver is the wrong version for that hardware.
Can you verify the CONFIG attribute shows up in “/proc/config.gz”? Can you verify any device tree changes show as present after reverse compiling the running system’s tree?
I am to connect GPS with PPS to Xavier,
I have to wire somehow input-output interface of the devices, right?
Could you extend if an adapter/connector needs to be procured? Garmin GPS 18 LVC.
Can the GPS be wired directly to the GPIO interface without additional adapters? If the answer is “NO” - what adapters I need to procure? Otherwise how to identify pins to connect?
Moreover, as I understand, there will be a need to identify pins “K53,K54,L51,H54” and wire the GPS to it, Right?
Any advise how to identify exactly these pins?
[source of the image - jetsonhacks]
UPD: these pins are 8,10,11,36 of J30
So far it seems to me that data in and data out will need t obe connected to GPIO [ to what pins? ], and additionally separate 5v will need to be settled for some wires.
gunzip < /proc/config.gz | grep CONFIG_PPS_CLIENT_GPIO
# CONFIG_PPS_CLIENT_GPIO is not set
nvidia@jetson-number:~$ zcat /proc/config.gz | grep -i pps
# PPS support
# CONFIG_PPS_DEBUG is not set
# PPS clients support
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_GPIO is not set
# PPS generators support