![Texas Instruments TMS320 2806 Series Technical Reference Manual Download Page 97](http://html1.mh-extra.com/html/texas-instruments/tms320-2806-series/tms320-2806-series_technical-reference-manual_1095596097.webp)
1.3.4.1 Servicing the Watchdog Timer
The WDCNTR is reset when the proper sequence is written to the WDKEY register before the 8-bit watchdog
counter (WDCNTR) overflows. The WDCNTR is reset-enabled when a value of 0x55 is written to the WDKEY.
When the next value written to the WDKEY register is 0xAA then the WDCNTR is reset. Any value written to
the WDKEY other than 0x55 or 0xAA causes no action. Any sequence of 0x55 and 0xAA values can be written
to the WDKEY without causing a system reset; only a write of 0x55 followed by a write of 0xAA to the WDKEY
resets the WDCNTR.
Table 1-42. Example Watchdog Key Sequences
Step
Value Written to WDKEY
Result
1
0xAA
No action
2
0xAA
No action
3
0x55
WDCNTR is enabled to be reset if next value is 0xAA.
4
0x55
WDCNTR is enabled to be reset if next value is 0xAA.
5
0x55
WDCNTR is enabled to be reset if next value is 0xAA.
6
0xAA
WDCNTR is reset.
7
0xAA
No action
8
0x55
WDCNTR is enabled to be reset if next value is 0xAA.
9
0xAA
WDCNTR is reset.
10
0x55
WDCNTR is enabled to be reset if next value is 0xAA.
11
0x32
Improper value written to WDKEY.
No action, WDCNTR no longer enabled to be reset by next 0xAA.
12
0xAA
No action due to previous invalid value.
13
0x55
WDCNTR is enabled to be reset if next value is 0xAA.
14
0xAA
WDCNTR is reset.
is the first action that enables the WDCNTR to be reset. The WDCNTR is not actually reset
until step 6. Step 8 again re-enables the WDCNTR to be reset and step 9 resets the WDCNTR. Step 10 again
re-enables the WDCNTR ro be reset. Writing the wrong key value to the WDKEY in step 11 causes no action,
however the WDCNTR is no longer enabled to be reset and the 0xAA in step 12 now has no effect.
If the watchdog is configured to reset the device, then a WDCR overflow or writing the incorrect value to the
WDCR[WDCHK] bits will reset the device and set the watchdog flag (WDFLAG) in the WDCR register. After a
reset, the program can read the state of this flag to determine the source of the reset. After reset, the WDFLAG
should be cleared by software to allow the source of subsequent resets to be determined. Watchdog resets are
not prevented when the flag is set.
1.3.4.2 Watchdog Reset or Watchdog Interrupt Mode
The watchdog can be configured in the SCSR register to either reset the device (WDRST) or assert an interrupt
(WDINT) if the watchdog counter reaches its maximum value. The behavior of each condition is described
below:
•
Reset mode:
If the watchdog is configured to reset the device, then the WDRST signal will pull the device reset ( XRS) pin
low for 512 OSCCLK cycles when the watchdog counter reaches its maximum value.
•
Interrupt mode:
If the watchdog is configured to assert an interrupt, then the WDINT signal will be driven low for 512 OSCCLK
cycles, causing the WAKEINT interrupt in the PIE to be taken if it is enabled in the PIE module. The watchdog
interrupt is edge triggered on the falling edge of WDINT. Thus, if the WAKEINT interrupt is re-enabled before
WDINT goes inactive, you will not immediately get another interrupt. The next WAKEINT interrupt will occur
at the next watchdog timeout. If the watchdog is disabled before WDINT goes inactive, the 512-cycle count
will halt and WDINT will remain active. The count will resume when the watchdog is enabled again.
System Control and Interrupts
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
97
Copyright © 2022 Texas Instruments Incorporated
Summary of Contents for TMS320 2806 Series
Page 2: ......