
Rev.2.10 Apr 14, 2006 page 102 of 378
REJ09B0124-0210
M16C/6N Group (M16C/6NK, M16C/6NM) 11. Watchdog Timer
Figure 11.2 Registers WDC and WDTS
11.1 Count Source Protective Mode
In this mode, a on-chip oscillator clock is used for the watchdog timer count source. The watchdog timer can
be kept being clocked even when CPU clock stops as a result of runaway.
Before this mode can be used, the following register settings are required:
(1) Set the PRC1 bit in the PRCR register to 1 (write to registers PM1 and PM2 enabled).
(2) Set the PM12 bit in the PM1 register to 1 (reset when the watchdog timer underflows).
(3) Set the PM22 bit in the PM2 register to 1 (on-chip oscillator clock used for the watchdog timer count source).
(4) Set the PRC1 bit in the PRCR register to 0 (write to registers PM1 and PM2 disabled).
(5) Write to the WDTS register (watchdog timer starts counting).
Setting the PM22 bit to 1 results in the following conditions:
• The on-chip oscillator starts oscillating, and the on-chip oscillator clock becomes the watchdog timer
count source.
• The CM10 bit in the CM1 register is disabled against write. (Writing a 1 has no effect, nor is stop mode entered.)
• The watchdog timer does not stop when in wait mode or hold state.
High-order bits of watchdog timer
Prescaler select bit
0 : Divide-by-16
1 : Divide-by-128
Reserved bits Set to 0
WDC7
Watchdog Timer Control Register
b7 b6 b5 b4 b3 b2 b1 b0
00
RW
RO
RW
RW
-
(b4-b0)
-
(b6-b5)
FunctionBit Symbol
Bit Name
Symbol Address After Reset
WDC 000Fh 00XXXXXXb
The watchdog timer is initialized and starts counting after a write instruction to
this register. The watchdog timer value is always initialized to 7FFFh regardless
of whatever value is written.
Watchdog Timer Start Register
(1)
Symbol Address After Reset
WDTS 000Eh Undefined
Function
RW
b7 b0
WO
NOTE
1. Write to the WDTS register after the watchdog timer interrupt request is generated.
Watchdog timer count (32768)
On-chip oscillator clock
Watchdog timer period =
Kommentare zu diesen Handbüchern