IMX WDT

From Variscite Wiki
Revision as of 19:43, 6 February 2021 by Pierluigi (talk | contribs) (Created page with "<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX6 as default --> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!-- --> {{#lst:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


VAR-SOM-MX6 watchdog

Kernel configuration

The internal watchdog is enabled by default in the kernel configuration.

To verify that the i.MX watchdog driver (CONFIG_IMX2_WDT) is enabled in your kernel configuration:

  • In menuconfig: Device Drivers -> Watchdog Timer Support -> <*> IMX2+ Watchdog

Using a command line

Watchdog will be activated as soon as /dev/watchdog is opened and will reboot unless the watchdog is pinged within timeout (128 is the preconfigured value).

$ echo "1" > /dev/watchdog0

Within 128 seconds the board will reset.

Compile watchdog test application

There's a watchdog testing utility C code example in the kernel source tree: tools/testing/selftests/watchdog-test.c (in older kernels: Documentation/watchdog/src/watchdog-test.c).

To cross compile it use the following command:

$ $CC ./tools/testing/selftests/watchdog-test.c -o ./watchdog-test