IMX WDT: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 1: Line 1:
<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX6 as default
<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX6 as default
--> {{INIT_RELEASE_PARAM|RELEASE_SUMO_V1.0_VAR-SOM-MX6}}<!--
--> {{INIT_RELEASE_PARAM|mx8mm-debian-bookworm-6.6.52_24.12-v1.0}}<!--
--> {{#lst:Android_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:Android_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
Line 33: Line 33:
To cross compile it:<br>
To cross compile it:<br>
Install the toolchain and source the environment setup script, by following the {{#varexists:FLEXBUILD_VERSION | {{Varlink2|Debian Flexbuild Toolchain installation|{{#var:RELEASE_LINK}}}} | {{Varlink2|Yocto Toolchain installation|{{#var:RELEASE_LINK}}}}}} guide, then run:
Install the toolchain and source the environment setup script, by following the {{#varexists:FLEXBUILD_VERSION | {{Varlink2|Debian Flexbuild Toolchain installation|{{#var:RELEASE_LINK}}}} | {{Varlink2|Yocto Toolchain installation|{{#var:RELEASE_LINK}}}}}} guide, then run:
{{#varexists:FLEXBUILD_VERSION |  
{{#varexists:FLEXBUILD_VERSION |  
  $ export CC=aarch64-linux-gnu-gcc
  $ export CC=aarch64-linux-gnu-gcc
|}}
|}}
  $ $CC ./tools/testing/selftests/watchdog-test.c -o ./watchdog-test
{{#ifeq: {{KERNEL_VERSION_NEWER|6.6.23|{{#var:KERNEL_VER}}}} | true |
  $ $CC ./tools/testing/selftests/watchdog-test.c -o ./watchdog-test |
$ $CC ./tools/testing/selftests/watchdog/watchdog-test.c -o ./watchdog-test
}}

Revision as of 18:25, 5 June 2025

Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release mx8mm-debian-bookworm-6.6.52_24.12-v1.0.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release


DART-MX8M-MINI 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 a 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:
Install the toolchain and source the environment setup script, by following the Debian Flexbuild Toolchain installation guide, then run:

$ export CC=aarch64-linux-gnu-gcc
$ $CC ./tools/testing/selftests/watchdog/watchdog-test.c -o ./watchdog-test