In Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation
gte_mon prints “HW timestamp GPIO EVENT xxxx.”
What is the clock of this timestamp? How can I read this clock used by GPIO timestamps so that I can correlate the GPIO timestamps to system time? The clock was not the same with CLOCK_MONOTONIC in my tests.
it’s TSC for hardware timestamp.
you may also refer to forum discussion thread, Topic 78821 for the details of timestamps.
Ah yes, thanks.
This is documented by the NVIDIA Xavier Series System-on-ChipTechnical Reference Manual, section 18.104.22.168.8 Timestamping (GTE): The AON cluster implements a timestamp module (GTE) for logging the current TSC value when interrupts or GPIO events occur.
The TSC can be read with
asm volatile("mrs %0, cntvct_el0" : "=r"(tsc));
asm volatile("mrs %0, cntfrq_el0" : "=r"(freq));
freq should be 31.25M.