GTE Edge-Triggered Interrupt Timing

I have an IMU that transmits packets when an edge triggered interrupt is received from a GPIO pin. I am trying to accurately time when those interrupts are transmitted by my Jetson Orin Nano devkit using the Generic Timestamping Engine. For this to work I believe there are two things I have to do:

  1. Enable GTE
  2. Configure AON GPIO pins

I am currently struggling with the first item in that list. I have done the following so far:

  1. Update tegra234-p3767-0000-p3768-0000-a0.dts to be what is shown below:
/dts-v1/;
#include "tegra234-dcb-p3767-0000-dp.dtsi"
#include <tegra234-soc/mods-simple-bus.dtsi>
#include <t234-common-cvm/tegra234-thermal.dtsi>
#include <t234-common-cvm/tegra234-cpuidle.dtsi>
#include <t234-common-cvm/tegra234-thermal-cooling.dtsi>
#include <t234-common-cvm/tegra234-thermal-userspace-alert.dtsi>
#include "cvm/tegra234-p3767-0000.dtsi"
#include "cvb/tegra234-p3768-0000-a0.dtsi"

/ {
	nvidia,dtsfilename = __FILE__;
	nvidia,dtbbuildtime = __DATE__, __TIME__;
	compatible = "nvidia,p3768-0000+p3767-0000", "nvidia,p3767-0000", "nvidia,tegra234", "nvidia,tegra23x";
	model = "NVIDIA Orin NX Developer Kit";

    gte@3aa0000 {
		status = "okay";
	};

	gte@c1e0000 {
		status = "okay";
	};

	gpio@c2f0000 {
		/delete-property/ use-timestamp;
	};
};
  1. Set following options in kernel config:
CONFIG_TEGRA_GTE_TEST=m
CONFIG_TEGRA_HTS_GTE=y
  1. Build kernel image and device tree blob.
  2. Copy kernel image and .dtb to Jetson and update /boot/extlinux/extlinux.conf to use copied files
  3. Reboot Jetson

The Jetson reboots successfully but I am unable to see /dev/gtechip0 and therefore unable to use the timestamping engine. The only thing I can think of doing is actually flashing the device tree and kernel image, but I’m not sure if that makes a difference.

With regards to the AON GPIO, I don’t believe any are enable by default from looking at pin diagrams. Are there any guides on how to do this. Will I need to generate new .dts files using the excel workbook?

Hi onish-ai,

I would suggest modifying in BSP package and re-flash the whole board to make sure your modification applied.

Have you referred to the following instruction for Generic Timestamp Engine?
Generic Timestamp Engine — Jetson Linux Developer Guide documentation (nvidia.com)

Hey @KevinFFF, thanks for getting back to me on this. I managed to get GTE to work by modifying a different device tree file, instead of adding:

gte@3aa0000 {
	status = "okay";
};

gte@c1e0000 {
	status = "okay";
};

gpio@c2f0000 {
	/delete-property/ use-timestamp;
};

to the end of tegra234-p3767-0000-p3768-0000-a0.dts, I added it to the end of tegra234-p3768-0000-a0.dtsi.

So now I can get timestamps using GTE by shorting two I2C pins together (since they use the AON GPIO controller) and using them as GPIOs. I am not sure about how to get other pins to use the AON GPIO controller instead of the main GPIO controller and would appreciate some help with this.

I am also not sure about what time GTE considers to be 0. Is it the point at which the kernel module is loaded?

Which GPIO are you using now? and which AON GPIO pin do you want to use?

Yes, it should be.

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