Watchdog

Hi,

I would like to reset TX2 when ubuntu crash or kernel panic. I have a few questions.

Q1: Tegra-WDT or PMIC-WDT which I could use?

Q2: What is different between PMIC-WDT、Tegra-WDT and external device hardware watchdog ?

https://devtalk.nvidia.com/default/topic/1058419/jetson-agx-xavier/how-does-external-mcu-know-that-xavier-get-watchdog-reset/post/5390685/#5390685

Q3: I want to use WDT_RESET_OUT_N pin and I followed this topic, but it’s not worked.

echo “mw 0xc360114 1” > /sys/kernel/debug/bpmp/debug/cons

return
bash: /sys/kernel/debug/bpmp/debug/cons: Permission denied

Thank you!

I can’t answer your questions, but for the echo into “/sys” use “sudo”, e.g.:

sudo echo "mw 0xc360114 1" > /sys/kernel/debug/bpmp/debug/cons

Hi linuxdev,

Thanks for your information.

I used sudo su before I used that commandline, and I didn’t see the cons folder.

Permission denied is quite different from a missing file or subdirectory. I was simply showing sudo for the command you had entered. On my system I do not have the “/sys/kernel/debug/bpmp/debug/cons”, so I don’t know anything about that feature.

The content in “/sys” is entirely “synthetic” in the sense that none of this is on the disk. All such content lives in RAM and is the result of a kernel driver or kernel feature creating this content. Either a kernel version is installed without this feature, or the feature is not available on that kernel version. Since this was your question:

Q3: I want to use WDT_RESET_OUT_N pin and I followed this topic, but it's not worked.

…I have to assume this watchdog timer feature is what would provide that file or subdirectory.

My question is this: You mentioned a crash or kernel panic. Flashing would reset everything, and if a software issue came about during development, then probably when flashed things would work well again. On the other hand, if you’ve added or modified a kernel feature, then adding or modifying that feature again would probably result in the same state.

I have no ability to tell you about the difference between the two watchdog timers, but if you are interested in flashing then this is not difficult. Are you looking to flash? Are you looking to add some watchdog timer features? Which software release is the Jetson currently running?

Hi linuxdev,

Thank you for your information.

On that topic it’s not more information about “/sys/kernel/debug/bpmp/debug/cons”.
So I assume the folder is exist and use that commandline.
As you say Permission denied is quite different from a missing file or subdirectory.
I’m confused why I use that commandline ,it shows Permission denied not the direction is missing.

I want to set the Jetson at other place, it’s not easy to reflash Jetson on manual.
So I want to find a way, if ubuntu crash or kernel panic, it could reboot or reset itself.
I think watchdog is a solution and my Jetson version is R32.3.1

If the echo command itself did not include sudo permissions, then permission could have been denied before ever finding out that the file is missing. Also, if the file is missing, then the echo command would be attempting to create the file with the content of the echo, and file creation would be denied in “/sys” even with sudo. Creating content in that directory is the realm of kernel features and drivers.

I do not know what kernel functionality is required for the “WDT_RESET_OUT_N pin”, but perhaps someone from NVIDIA could elaborate on that. My guess is that you will need to take the existing kernel configuration and add some other configuration to this (perhaps also user space software).

Flashing the Jetson from a remote location without an Ubuntu host PC is generally not possible. A Jetson which has already been flashed with the latest L4T R32.3.1 (JetPack 4.3) does now have some OTA update ability. WDT could be used to cause a reboot in case of some failures, but I wouldn’t consider it as a way to flash.

Hi linuxdev,

Thank you for your information again.

Flash Jetson without a host PC is not possible,but I think backup Jetson’s emmc and recovery it,maybe it’s could work.
I’m waiting someone from NVIDIA to answer my question and help me, about how to use watchdog to reboot Jetson.

Hi Nvidia,

Any update? thank you

Karis

Hi,

I guess this file is not existing on your tx2 because that topic was for xavier?

Q1: Tegra-WDT or PMIC-WDT which I could use?

Tegra-WDT:
This reset is done using the Tegra PMC.SYS_RST = 1 on PMC register. This only reset the tegra internal SOC. SDRAM will still contain same data.

PMIC reset
This will reset complete system, Tegra + external peripheral.

I am wondering what do you need in this topic. According to your comment, “I would like to reset TX2 when ubuntu crash or kernel panic”, this is how default tegra-WDT would do. You only need to enable it through ODM data during flash. Also, we already enabled it in default ODM data, so nothing needs to configure.

Hi WayneWWW,

Thank you for your reply.

This topic was for TX2. ^^
https://devtalk.nvidia.com/default/topic/1064271/jetson-tx2/use-of-tx2-watchdog-peripheral-role-of-wdt_time_out-input/post/5414075/#5414075

Thank you for your information.

Hi WayneWWW,

echo “mw 0xc360114 1” > /sys/kernel/debug/bpmp/debug/cons

Any update about the command line for TX2?
Thank you.

Karis

Hi Karis,

Per checked with our kernel developer, this path only exists on xavier platform with latest BPMP firmware.

Thus, for TX2, you need to get into the bpmp console through UART7 ans use the command directly.

mw 0xc360114 1