Timestamping GPIO


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


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.

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.