Jetson TX2 platform-level shared hardware timer

I’m exploring the Jetson TX2 module. Specifically, I’m looking for a platform-level shared hardware timer that can be used by both CPUs (A57 and Denver2). Is there such thing available on the module? I haven’t found it (yet) on the documentation, keep looking for it.

Thanks in advance.

Hi takarto,

Does watchdog timer meet your requirement?

Hi WayneWWW,

I’ve been reading a bit more about the watchdog available on JetsonTx2 before answering. It seems all the documentation available reffer to what it is documented on Linux Kernel documentation, so I also checked Documentation/watchdog/watchdog-api.txt.

I am looking for a hardware timer (it would be nice if it has autorefill capability) that is shared between both CPUs, i.e. once it expires it can trigger an event for every active core in the system, in this case I may need to look deeper on the GIC-400 which, as I understand, is available for both CPUs.

So my main requirement is:
-An external hardware timer (with auto refill ability is desirable).
-That every core from both CPUs to be sensitive to the event when the timer expires.

I am assuming that the wathdog, could meet such need (by using the pretimeout for example), however the main purpose of the watchdog is to monitor the CPU activity and call routines to recover the system. So, I would prefer not to limit it with my requirement and leave it for its original goal.

That’s why I would preffer to use another external timer if available. Is there any?

Hi katarto,

You could refer to the TX2 TRM (technical reference manual) from our download center and see if any other hardware timer is available.

1 Like

Hi WayneWWW,

Thank you for the reference. I will take a look on it and will reply here back with my findings.

Hi WayneWWW,

In the TX2 trm (Parker_TRM_DP07821001p.pdf), it says that regarding the WDT if the expiration level is 3 or more, a normal interrupt (IRQ) routed to the LIC and from there routed to a set of processors. I found this interesting for my purpose.

Now, I have the JetsonTX2 with L4T 4.9.140-tegra and Ubuntu 18.04. The built-in watchdog works as expected, rebooting the system when I am not kicking the WDT after the specified time (120s by default).

In order to get a WDT with expiration level of 3 (to route the interruption to more than once processor) and without rebooting the system, I have to write the driver for it and build the kernel with it.

Can you please confirm whether my understanding is correct?

Also, according to TX2 trm (section 7.8.2), by using a TKE Module is possible to route the interruption generated by an NV Timer to shared interruptions. This can be also a good option.

I have another question, if I want to use the TKE Module, is it possible to write the code, compile and run it from the L4T OS or do I have to do it from a host PC?

Hi takarto,

You can use pps driver to fetch time of generated events.
Add pps node in device tree:
pps {
gpios = <&tegra_main_gpio TEGRA_MAIN_GPIO(I, 4) GPIO_ACTIVE_LOW>;
compatible = “pps-gpio”;
status = “okay”;
You have to drive chosen GPIO pin externally based on your use-case.
You can choose any GPIO present on 40-pin (J30) for this purpose. Here, I have used Pin 37 (GPIO I.04) on 40-pin connector of Jetson-Tx2
Flash with this dtb.
When system boots, you will see sysfs node generated:
ls /sys/class/pps/pps0/
Whenever event is generated on falling edge of signal (When GPIO pin value goes from high to low), timestamp will be captured using kernel timer and seen using:
cat /sys/class/pps/pps0/assert
If you want events to generate on rising edge of signal then remove assert-falling-edge; property from device node.
Check if it serves your purpose.


Hi Shubhi,

Thank you for your comment regarding the pps node. However, what I need is to know how to configure a TKE Module (which is mentioned on the TX2 technical reference manual) so I can generate an interrupt in the range of microseconds (or at least 1ms) and then to hook such interrupt to the LIC to have shared interrupts. (this is mentioned in section 7.8.2 Optional Interrupt Routing).

Thanks in advance.

Hi takarto,
Related to your previous query, you have to add watchdog property “nvidia,disable-por-reset;” in kernel device tree file under watchdog node : “watchdog@30c0000” for system not to reboot. And by default, expiration levels are >=3. Also, it uses TKE shared interrupts.

1 Like

Hi Shubhi,
Thanks a lot! This will help me greatly.

Just adding few information from my findings to summarize:

-Despite the good hint from Shgarg regarding how to avoid rebooting by the watchdog, it is not the solution to the original question. That’s why I unmarked it as solution.

-WayneWWW pointed out to refer the TX2 TRM, which describes the TKE modules. Such modules contains: 16 timers and 4 watdog timers. Regarding the interrupts, from the TRM: “The interrupt routing block takes the set of interrupts present in the TKE and aggregates them in configurable fashion into nSI shared interrupts”.

-Unfortunately, I did not find any way to access such timers from user space in Linux for Tegra. However there is a patch by Thierry Reding, which “Add native timer support on Tegra186”.
Note: I have not tried this patch yet. However this is pointing out to answer to my original question.

Thanks WayneWWW and Shubhi (Shgarg) for your support.