6.2 Application Instructions
Certain CPU boards provide the hardware retriggering of the watchdog timers. To use the watchdog timer, you must first decide if you want to enable hardware retriggering with an external signal. The AthenaII SBC has this feature enabled. Please refer to the AthenaII user manual for more details on how to use this feature.
All of the Diamond SBC boards also provide a software triggering of the watchdog timer. The general guidelines for using a software programmable watchdog timer are as below.
- Call the function dscWatchdogEnable to enable and configure the watchdog timer. Once this function is called, one of two things must happen continually at a rate faster than the timeout value of WD1:
- Your program must call dscWatchdogTrigger to retrigger the watchdog timer and restart WD1's countdown process.
- If hardware triggering is enabled, the external watchdog input signal must provide the selected active edge (rising or falling) to pin WDI.
If neither event happens before WD1 times out, the watchdog circuit will reset the system.
To disable the watchdog timer, call dscWatchdogDisable at any time. To reenable the watchdog timer with the same parameters, you can simply call dscWatchdogTrigger again. To reenable the watchdog timer with different parameters, you must call dscWatchdogEnable with the new parameters.
Example programs are provided with the CPU Universal Driver examples zip file to illustrate watchdog timer operation. This program will reset the system in order to demonstrate the functionality of the watchdog timer circuit!