We have two devices with NX. Each NX device controls its own camera via GPIO.
We would like to synchronize NX devices via PTP. After synchronization, we would like each NX device to send a pulse per second to its own camera.
Currently, we could synchronize two NX devices via PTP. Both system clocks are synced.
But we are trying to find a way to send a pulse per second to the camera via GPIO.
Is there any way to send these pulses so that is not dependent on software.(ie) similar to a hardware PPS pin ? Basically we would like to send a pulse per second very accurately to our cameras.
you might refer to Jetson Xavier hardware pps_out - #16 by shgarg, which produce pps signals on GPIO.
itās sample driver to feed pps signals in GPIO and capture timestamps to synchronize system every second.
thanks
Thereās a kernel driver named ānvppsā that can generate the PPS signal on a GPIO pin from PTP. You have to enable the driver in the kernel config and add the gpio pin to the DTB.
We checked the nvpps driver.
It appears the default nvpps driver code can have PPS input via GPIO in GPIO mode.
The code by default does not support PPS output on GPIO unless we modify the code.
We modified the nvpps driver code to generate PPS on GPIO in timer mode. The timer mode in nvpps driver is based on linux timer. And on each timer event, it reads the PTP time from PHC.
When two NX boards synced over PTP use nvpps driver, we could not get the PPS accurately.
We choose to use the GPIO PPS generator code and it is based on high resolution timer. We could get PPS accurately upto microsecond drift from two NX boards after they sync their system clocks over PTP.
However the nvpps driver code is based on linux timer and jiffies. The drift in PPS between two boards is huge. Probably if we modify this, it may become closer.
Hi @Srinivasan.Arvindh , can you please share the GPIO PPS Generator code which you used to acheive microsecond drift ? We are also trying to generate PPS from PTP.