|
NetBurner 3.5.6
PDF Version |
Supported Platforms: MOD5441x, NANO54415, SB800EX
This example demonstrates how to enable the watchdog, set the timeout value, and service the watchdog. An interactive menu and status messages are displayed through the debug serial port. If the watchdog is not serviced before the timeout expires, events such as a system reset or interrupt service request (IRQ) can occur. The following watchdog timeout modes are supported by the 5441x processor:
Servicing the watchdog can be accomplished in a number of ways:
A good system implementation would be to use the task and timer method, along with flags, counters or some other indication in each critical task that is evaluated in the watchdog service task to ensure the system is functioning properly.
The example includes code for both the task with timer method and interrupt method; you will only need one of these in your application.
Example Features:
This example does not enable the watchdog in the Flash memory system configuration so that a power cycle will reset the system with the watchdog disabled. This is done to make it easier to experiment with the various watchdog modes of operation. If you wish to have the watchdog persistently enabled through power cycles without explicitly enabling it in your application, the watchdog must be enabled in the configuration system.