Hi,
I would like to change the watchdog setting of my i.MX8mp device but I have not seen an appropriate material to guide me. I would like clarification on this.
1. Is the watchdog section (2.11) in the i.MX Linux Reference Manual applicatble to the i.MX8mp. From what I have read it is not.
2. The hardware watchdog timer is configured in the ATF (arm trusted frimware). How do I change the setting of the hardware watchdog. Is there an example for this.
I would like to change the reset time to less than 10 seconds.
Thanks
On Linux OS, atf is transparent.
Linux knowledge is the same.
You can use any watchdog utililty, such the watchdog utility in busybox, coreutils and linux utils.
You can make your own watchdog utility like bsp watchdog utility in unit_tests.
unit_tests/Watchdog/wdt_driver_test.out
---- Running < /unit_tests/Watchdog/wdt_driver_test.out > test ----
Usage: wdt_driver_test <timeout> <sleep> <test>
timeout: value in seconds to cause wdt timeout/reset
sleep: value in seconds to service the wdt
test: 0 - Service wdt with ioctl(), 1 - with write()
Hello @ababatola
Is the watchdog section (2.11) in the i.MX Linux Reference Manual applicatble to the i.MX8mp. From what I have read it is not.
--> Yes, you can refer this. The i.MX8MP uses imx2-wdt.c driver.
The following IOCTLs are supported in the WDOG driver:
• WDIOC_GETSUPPORT
• WDIOC_GETSTATUS
• WDIOC_GETBOOTSTATUS
• WDIOC_KEEPALIVE
• WDIOC_SETTIMEOUT
• WDIOC_GETTIMEOUT
For detailed descriptions about these IOCTLs, see Documentation/watchdog.
I still need some clarifications.
1. According to the watchdog-api.rst - the watch dog is activated as soon as the /dev/watchdog is opened; does this mean that the watchdogd daemon does not service the watchdog? or that the watchdog is not active although the watchdogd deamon is running.
2. If the watchdogd deamon process is running and meant to service the watchdogd, why do I need to write a user space applicaiton to service the watchdog to prevent a time out. What precisely is the work of the watchdogd?
3. In the /dev/watchdog* I have 2 watchdogs - watchdog and watchdog0 however, when I exported the watchdog to user space using sysfs variable in the kernel configuration, only the watchdog0 was exported. What is the reason for this. Why is the first watchdog watchdog not listed in the sysfs but only watchdog0.
Thanks
lots of cases, user space gets dead, kernel space is still alive.
The watch dog device under /dev is for user space to use.
If like you said feeding watch dog in kernel space. Why linux need watch dog device. linux is not for imx linux BSP. it is for example x86/x64 as well.
using linux, because have common interface. Linux knowledge is the same.
X84/x64 ubuntu linux also can have watch dog. when we need to change the watch dog timeout. We need to change source code and compile linux? answer is no.
already told you the command to set the watch dog timeout. and you can set it less than 10s.
If the user space is dead, but you feed watch dog in kernel space. The system will not get reset and recovery.
feeding watch dog should through the top(application/user space ) to bottom.
never see any watch dog as you said feeding only kernel space.never see single one case.
Linux, QNX, Android. each and every one is feeding watch dog from user space.