The MCA implements a watchdog timer in its firmware. Both internal CPU watchdog timers on the ConnectCore 6UL are disabled by default because the MCA is responsible for the power/reset initialization of the SOM as a whole.

Features

You can configure the following MCA watchdog features:

  • Set the timeout to a value between 1 and 255 seconds.

  • Initiate interrupt or system reset.

  • Initiate full-system reset (including the MCA itself) or CPU-only reset.

Kernel configuration

You can manage the MCA watchdog driver support through the following kernel configuration option:

  • Digi ConnectCore 6UL Micro Controller Assist Watchdog (CONFIG_MCA_CC6UL_WATCHDOG)

This option is enabled as built-in on the default ConnectCore 6UL kernel configuration file.

Kernel driver

The MCA watchdog driver is located at:

File Description

drivers/watchdog/mca_cc6ul_wdt.c

MCA watchdog driver

Device tree bindings and customization

The MCA watchdog device tree binding is documented at Documentation/devicetree/bindings/watchdog/mca-cc6ul-wdt.txt.

Watchdog inside the MCA

ConnectCore 6UL device tree
mca_cc6ul: mca@7e {

	...

	watchdog {
		compatible = "digi,mca-cc6ul-wdt";
		digi,full-reset;
	};
};

Using the watchdog

The MCA 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.txt.

Watchdog test application

You can install the package dey-examples-watchdog, which includes the test application watchdog_test.

The watchdog_test application allows you to specify the watchdog timeout value and the test time. The application refreshes the watchdog timer every second during the test time. After the test time is over, the application no longer refreshes the watchdog. The driver resets the system when the configured timeout period ends without the watchdog being refreshed.

Syntax

To display the application syntax, run:

~# watchdog_test -h

Example

Run the test for 10 seconds, setting the watchdog timeout to two seconds:

~# watchdog_test -n 10 -t 2

In this example:

  • The watchdog timeout is set to two seconds.

  • The watchdog timer is enabled.

  • The application refreshes the watchdog timeout count every second for 10 seconds.

  • After 10 seconds, the application quits and stops refreshing the watchdog.

  • The driver resets the system two seconds after the application has stopped refreshing the watchdog.