Texas Instruments MSC1210 manual Watchdog Timer

Models: MSC1210

1 324
Download 324 pages 20.97 Kb
Page 180
Image 180

Watchdog Timer

Although the watchdog timeout value (0x07 in the previous example) may be set at the same time as the EWDT bit is cleared, it may be changed after the fact. If the timeout value is changed after the watchdog has been enabled, the new timeout will take effect the next time the watchdog times out, or the next time the watchdog is reset (see next section). For example:

WDTCON = 0x80; // Set EWDT

WDTCON = 0x07; // Clear EWDT, set timeout = 7, 800ms

WDTCON = 0x06; // Set timeout = 6, 700ms

In this example, the watchdog will initially be enabled with a timeout of 800ms. The very next instruction sets the timeout to 700ms. In this case, the watchdog will time out after 800ms, unless it is reset as described in the following section. Once the watchdog has been reset, the new timeout of 700ms will take effect.

14-6

Page 180
Image 180
Texas Instruments MSC1210 manual Watchdog Timer