Interval Timer Operation; Interval Timer Interval Time - NEC PD78081(A) User Manual

8-bit single-chip microcontroller
Table of Contents

Advertisement

7.4.2 Interval timer operation

The watchdog timer operates as an interval timer which generates interrupt requests repeatedly at an interval of
the preset count value when bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is set to 0.
A count clock (interval time) can be selected by the bits 0 to 2 (TCL20 to TCL22) of the timer clock select register
2 (TCL2). By setting the bit 7 (RUN) of WDTM to 1, the watchdog timer starts operating as an interval timer.
When the watchdog timer operated as interval timer, the interrupt mask flag (TMMK4) and priority specify flag
(TMPR4) are validated and the maskable interrupt request (INTWDT) can be generated. Among maskable interrupt
requests, the INTWDT default has the highest priority.
The interval timer continues operating in the HALT mode but it stops in STOP mode. Thus, set bit 7 (RUN) of
WDTM to 1 before the STOP mode is set, clear the interval timer and then execute the STOP instruction.
Cautions 1. Once bit 4 (WDTM4) of WDTM is set to 1 (with the watchdog timer mode selected), the interval
timer mode is not set unless RESET input is applied.
2. The interval time just after setting with WDTM may be shorter than the set time by a maximum
of 0.5 %.
TCL22 TCL21 TCL20
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
Remarks 1. f
: Main system clock frequency (f
XX
2. f
: Main system clock oscillation frequency
X
3. MCS : Oscillation mode selection register (OSMS) bit 0
4. Values in parentheses when operated at f
110
CHAPTER 7 WATCHDOG TIMER
Table 7-5. Interval Timer Interval Time
Interval Time
11
2
1/f
XX
12
2
1/f
XX
13
2
1/f
XX
14
2
1/f
XX
15
2
1/f
XX
16
2
1/f
XX
17
2
1/f
XX
19
2
1/f
XX
or f
X
X
MCS = 1
11
2
1/f
(410 s)
X
12
2
1/f
(819 s)
X
13
2
1/f
(1.64 ms)
X
14
2
1/f
(3.28 ms)
X
15
2
1/f
(6.55 ms)
X
16
2
1/f
(13.1 ms)
X
17
2
1/f
(26.2 ms)
X
19
2
1/f
(104.9 ms)
X
/2)
X
= 5.0 MHz.
MCS = 0
12
2
1/f
(819 s)
X
13
2
1/f
(1.64 ms)
X
14
2
1/f
(3.28 ms)
X
15
2
1/f
(6.55 ms)
X
16
2
1/f
(13.1 ms)
X
17
2
1/f
(26.2 ms)
X
18
2
1/f
(52.4 ms)
X
20
2
1/f
(209.7 ms)
X

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents