Timestamping GPIO

Hi,

I am using JetsonTX2 NX and JetPack 4.6.4 (Jetson Linux R32.7.4) and trying to get precise timestamps of AON GPIO pin state change.
Documentation here:
# Jetson Linux R32.7.4
mentions Timestamping GPIO feature but there is no additional documentation I could find.

Documentation for version R34.1:
https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/Kernel/GenericTimestampEngine.html
mentions Generic Timestamp Engine (GTE) but it is a newer version of the JetPack (that I can’t use at the time), and it says that it applies only to “Jetson AGX Orin and Jetson AGX Xavier series”.

There is an another thread here:

asking about the same thing but first response (in 2019) says
“Sorry to tell the timestamp is the interrupt time and the software not implement yet.”
Then two years later official response was:
“tegra194_gte.c is not compatible with TX2 and it is never tested on TX2 for that reason. However, you can refer TX2 technical reference manual to modify but NVIDIA does not provide support for the same.”

My questions are:

  1. Is GTE supported on Jetson TX2 NX?
  2. Is there any other mechanism to precisely generate timestamps on AON GPIO pin state change?
  3. If I switch to Orin NX (and newer version of JetPack) can I use GTE?

What’s important here, the absolute time stamp? i.e. relative to the real absolute time or relative timestamp? i.e. relative to other timestamps your received.

I ask because unless take special steps the absolute time of your computer can easily be 1ms away from the absolute time, even using ntp to a close time server. If that is the case then the jitter and software delays should be easily obtainable to less than 1ms of difference and if that is the case the problem shifts to how to keep the clock of the computer very accurate. If that works for you then I maybe have a project that helps with that :-)

This turns a Raspberry Pi into a stratum #1 time server (You could turn off the recorder part). In principle you could deploy this approach on the Jetson as well.

Kim Hendrikse

To give you an idea. When I was testing the sound localised I connected one switch to the gpio of two Rasoberry Pi zeros and printed the time with a simple python script. Typically the time difference was less than 100us. One time was just 16us of difference. These two systems had sub microsecond timing error on them. And I expect all of that difference is jitter in the process, none the less it’s very low.

If the carrier board doesn’t have a real time clock chip on it then I would expect typically a few ms of drift in a day. In that case even a relative time difference would be a lot.

So unless you are also taking care of the timing of the system clock or you are only wanting to compare timestamps with a very close locality this should be sufficient. Knowing nothing about your use case of course.

Thank you Kim for the info.
I primarily need good accuracy between pin state changes.
Once this is achieved getting absolute time is less of a problem, and the precision doesn’t have to be as good.
I’ll take a look at the library but I need answers to my questions from someone from NVidia.

Kind regards,
Ivan

1 Like

For GTE in R32.7.4, you could refer to Generic Timestamp Engine for details.

It seems GTE only support for AGX Xavier(T194), and TX2 NX(T186) not support for this feature.

May I know what’s your use case for HW timestamping?

From the developer guide in the latest R35.4.1, it could only support for AGX Orin and AGX Xavier.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.