Watchdog

The phyCORE-i.MX7 SOM comes equipped with a hardware Watchdog that is accessible through /dev/watchdog. The Watchdog feature is intended to automatically restart the system should it face a critical software or hardware hang up. This guide will walk through the basic setup and verification of the watchdog by manually triggering a Kernel panic to initiate an automatic reboot.

Step-by-Step Guide

  • Ensure that your phyCORE-i.MX7 Development Kit is booted into Linux and that you are logged in as the root user.

  • Set the Watchdog’s timeout to 10 seconds using the following command:

    Target (Linux)
    wdctl -s 10
    
  • Now manually trigger a Kernel failure:

    Target (Linux)
    echo c > /proc/sysrq-trigger
    
  • You should see the phyCORE-i.MX7 begin to reboot approximately 10 seconds after the end of the Kernel panic.

    Tip

    For a more useful guide on how to enable the WatchDog automatically upon boot, check out :ref: writeAScriptForBoot-7.