The watchdog timer, set to specific time intervals, handles gross system misbehavior. The watchdog timer can be enabled or disabled depending on the operating condition. Once the watchdog timer is activated, it must be serviced by software on a periodic basis. If servicing does not take place in time, the watchdog times out and issues a system reset.
The ConnectCore 93 has:
-
Five watchdogs available on the i.MX93 system-on-chip
Features
The features of the i.MX93 watchdog include:
-
Device tree-configurable timeout, in seconds
-
Option to disable the watchdog timer count during low power mode
-
Inability to stop watchdog once started
Kernel configuration
You can manage the i.MX93 watchdog driver support through the kernel configuration option IMX7ULP Watchdog (CONFIG_IMX7ULP_WDT
).
This option is enabled as built-in on the ConnectCore 93 Development Kit kernel configuration file.
Kernel driver
The watchdog driver for the i.MX93 is located at drivers/watchdog/imx7ulp_wdt.c
.
Device tree bindings and customization
The watchdog device tree binding is documented at Documentation/devicetree/bindings/watchdog/fsl-imx7ulp-wdt.yaml
.
The i.MX93 watchdog timer is defined in the common i.MX93 device tree file:
wdog3: wdog@42490000 {
compatible = "fsl,imx93-wdt";
reg = <0x42490000 0x10000>;
interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX93_CLK_WDOG3_GATE>;
timeout-sec = <40>;
};
Use the watchdog
The watchdog is accessible via the file descriptor /dev/watchdog0
.
For information about the watchdog API, see the Linux kernel documentation at Documentation/watchdog/watchdog-api.rst
.
Sample application
An example application called apix-watchdog-example
is included in the dey-examples-digiapix recipe (part of dey-examples package) of the meta-digi layer.
This application uses the Digi APIx library to enable a watchdog device on the ConnectCore 93.
Go to GitHub to see the application instructions and source code.
See Watchdog API for more information about the watchdog APIx.