Timestamping GPIO

Hi,

in L4T Development Guide there is a mention of GPIO timestamping feature:

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Fsoftware_features_tx2_tx2i.html%23wwpID0E0EB0HA

How can it be accessed from Linux? My task is to have timestamp of rising (or/and falling) edge on TX2 GPI, the more precise the better. Pure software solution has its limitations, specifically high jitter, so I’m interested in hardware timestamping of GPIO interrupts.

@Ximea
Sorry to tell the timestamp is the interrupt time and the software not implement yet.

Is it possible to implement this feature ourselves based on GTE and IVC examples for SPE? It looks like it should work, but maybe I’m missing something. Main question though is timestamp conversion - how timestamp reported by GTE corresponds to time sources used by Linux kernel? Ideally I would like a way to convert it to real time clock used by Linux.

Its is possible to implement but one needs to know all the registers to be read for GTE block.
We will be providing SW support for GTE in next release.
Please note that GTE gives timestamp using TSC ( Time Stamps Counter @ 31.25Mhz) which is a free running counter. It starts as soon as system boots.
So, clock_get_time in kernel is TSC counter value minus the counter value when kernel starts executing in nano sec.
While system time is RTC time.
Hope this helps

Thank you for the answer, we will wait for next release then.