
R8C/3GM Group
14. Watchdog Timer
R01UH0284EJ0100 Rev.1.00
Aug 09, 2011
14.3.2
Count Source Protection Mode Disabled
The count source for the watchdog timer is the CPU clock when count source protection mode is disabled.
Notes:
1. The watchdog timer is initialized when 00h and then FFh is written to the WDTR register. The
prescaler is initialized after a reset. This may cause some errors due to the prescaler during the
watchdog timer period.
2. The WDTON bit cannot be changed by a program. To set this bit, write 0 to bit 0 of address 0FFFFh
with a flash programmer.
3. Write the WDTR register during the count operation of the watchdog timer.
Table 14.2
Watchdog Timer Specifications (Count Source Protection Mode Disabled)
Item
Specification
Count source
CPU clock
Count operation
Decrement
Period
Division ratio of prescaler (n) × count value of watchdog timer (m)
(1)CPU clock
n: 16 or 128 (selected by the WDTC7 bit in the WDTC register), or
2 when selecting the low-speed clock (CM07 bit in CM0 register = 1)
m: Value set by bits WDTUFS0 and WDTUFS1 in the OFS2 register
Example:
The period is approximately 13.1 ms when:
- The CPU clock frequency is set to 20 MHz.
- The prescaler is divided by 16.
- Bits WDTUFS1 to WDTUFS0 are set to 11b (3FFFh).
Watchdog timer
initialization conditions
Reset
Write 00h and then FFh to the WDTR register.
(3) Underflow
Count start conditions
The operation of the watchdog timer after a reset is selected by
the WDTON bit
(2) in the OFS register (address 0FFFFh).
When the WDTON bit is set to 1 (watchdog timer is stopped after reset).
The watchdog timer and prescaler are stopped after a reset and
start counting when the WDTS register is written to.
When the WDTON bit is set to 0 (watchdog timer starts automatically after
reset).
The watchdog timer and prescaler start counting automatically after a reset.
Count stop condition
Stop mode, wait mode (Count resumes from the retained value after exiting.)
Operations at underflow
When the PM12 bit in the PM1 register is set to 0.
Watchdog timer interrupt
When the PM12 bit in the PM1 register is set to 1.