English
Language : 

CP3BT23 Datasheet, PDF (177/260 Pages) Texas Instruments – CP3BT23 Reprogrammable Connectivity Processor with Bluetooth and Dual CAN Interfaces
24.3 WATCHDOG OPERATION
24.3.2 Power Save Mode Operation
The Watchdog is an 8-bit down counter that operates on the The Timer and Watchdog Module is active in both the Power
rising edge of a specified clock source. At reset, the Watch- Save and Idle modes. The clocks and counters continue to
dog is disabled; it does not count and no Watchdog signal is operate normally in these modes. The WDSDM register is
generated. A write to either the Watchdog Count (WDCNT) accessible in the Power Save and Idle modes, but the other
register or the Watchdog Service Data Match (WDSDM) TWM registers are accessible only in the Active mode.
register starts the counter. The Watchdog counter counts Therefore, Watchdog servicing must be carried out using
down from the value programmed in the WDCNT register. the WDSDM register in the Power Save or Idle mode.
Once started, only a reset can stop the Watchdog from op- In the Halt mode, the entire device is frozen, including the
erating.
Timer and Watchdog Module. On return to Active mode, op-
The Watchdog can be programmed to use either T0OUT or eration of the module resumes at the point at which it was
T0IN as its clock source (the output and input of Timer T0, stopped.
respectively). The TWCFG.WDCT0I bit controls this clock Note: After a restart or Watchdog service through WDCNT,
selection.
do not enter Power Save mode for a period equivalent to 5
Software must periodically “service” the Watchdog. There
are two ways to service the Watchdog, the choice depend-
ing on the programmed value of the WDSDME bit in the
Timer and Watchdog Configuration (TWCFG) register.
If the TWCFG.WDSDME bit is clear, the Watchdog is ser-
viced by writing a value to the WDCNT register. The value
written to the register is reloaded into the Watchdog counter.
te The counter then continues counting down from that value.
If the TWCFG.WDSDME bit is set, the Watchdog is ser-
viced by writing the value 5Ch to the Watchdog Service
Data Match (WDSDM) register. This reloads the Watchdog
counter with the value previously programmed into the WD-
CNT register. The counter then continues counting down
le from that value.
A Watchdog error signal is generated by any of the following
events:
! The Watchdog serviced too late.
! The Watchdog serviced too often.
o ! The WDSDM register is written with a value other than
5Ch when WDSDM type servicing is enabled
(TWCFG.WDSDME = 1).
A Watchdog error condition resets the device.
s 24.3.1 Register Locking
Slow Clock cycles.
24.4 TWM REGISTERS
The TWM registers controls the operation of the Timing and
Watchdog Module. There are six such registers:
Table 69 TWM Registers
Name
TWCFG
TWCP
TWMT0
T0CSR
WDCNT
WDSDM
Address
FF FF20h
FF FF22h
FF FF24h
FF FF26h
FF FF28h
FF FF2Ah
Description
Timer and Watchdog
Configuration Register
Timer and Watchdog
Clock Prescaler
Register
TWM Timer 0 Register
TWMT0 Control and
Status Register
Watchdog Count
Register
Watchdog Service
Data Match Register
The Timer and Watchdog Configuration (TWCFG) register
is used to set the Watchdog configuration. It controls the
b Watchdog clock source (T0IN or T0OUT), the type of
Watchdog servicing (using WDCNT or WDSDM), and the
locking state of the TWCFG, TWCPR, TIMER0, T0CSR,
and WDCNT registers. A register that is locked cannot be
read or written. A write operation is ignored and a read op-
O eration returns unpredictable results.
The WDSDM register is accessible in both Active and Pow-
er Save mode. The other TWM registers are accessible only
in Active mode.
If the TWCFG register is itself locked, it remains locked until
the device is reset. Any other locked registers also remain
locked until the device is reset. This feature prevents a run-
away program from tampering with the programmed Watch-
dog function.
www.national.com
176