How can I enable the HW watchdog for the Apalis TK1 for SoM version V1.1A?
Some precondition: I can not use systemd
To use the hw watchdog I would assume something to be done like follows (with regards to instructions for the colibri v61):
- enable the hw watchdog in u-boot by executing in the u-boot prompt something like
mw.w 0x4003e000 xx34 1) (detects: crash of kernel during boot)
- add the driver of the watchdog to the device-tree
- configure the Linux driver that it does not reset the watchdog settings to “watchdog disabled” at begin of startup
- configure the kernel to softlookup panic with one of (a) a sysctl, (b) “kernel.softlockup_panic”, (c) a kernel parameter, (d) “softlockup_panic” (see “Documentation/admin-guide/kernel-parameters.rst” for details), and (e) a compile option, “BOOTPARAM_SOFTLOCKUP_PANIC” (detects: softlockup = bug that causes the kernel to loop in kernel mode for more than 20 seconds without giving other tasks a chance to run → timer/interrrupt can still service watchdog)
- configure the kernel to hardlockup panic with one of (a) a sysctl, (b) ‘hardlockup_panic’, (c) a compile time knob, (d) “BOOTPARAM_HARDLOCKUP_PANIC”, (e) and a kernel parameter “nmi_watchdog” (see “Documentation/admin-guide/kernel-parameters.rst” for details). (detects: ‘hardlockup’ = bug that causes the CPU to loop in kernel mode for more than 10 seconds without letting other interrupts have a chance to run. → timer/interrupt can not service watchdog)
- boot kernel with boot option something like
tegra_wdt.heartbeat=$secondsthat the kernel services the watchdog with a kernel level timer
- service watchdog during init with init process
- user space application which services watchdog from user space regularly (detects: crash of kernel, crash of this user space application, user space application process not executed regularly)
BTW: Is the Watchdog (Linux) article also valid for the TK1?