RL78/G10 CHAPTER 6 TIMER ARRAY UNIT
R01UH0384EJ0311 Rev. 3.11 123
Dec 22, 2016
Figure 6-8. Format of Timer Mode Register 0n (TMR0n) (3/3)
Symbol 7 6 5 4 3 2 1 0
TMR0nL
(n = 0 to 3)
CIS0n1 CIS0n0 0 0 MD0n3 MD0n2 MD0n1 MD0n0
CIS0n1 CIS0n0 Selection of TI0n pin input valid edge
0 0 Falling edge
0 1 Rising edge
1 0
Both edges (when low-level width is measured)
Start trigger: Falling edge, Capture trigger: Rising edge
1 1
Both edges (when high-level width is measured)
Start trigger: Rising edge, Capture trigger: Falling edge
If both the edges are specified when the value of the STS0n2 to STS0n0 bits is other than 010B, set the CIS0n1 to
CIS0n0 bits to 10B.
MD
0n3
MD
0n2
MD
0n1
Setting of operation
mode of channel n
Corresponding function
Count operation of
TCR
0 0 0 Interval timer mode
Interval timer/Square wave output/Divider
function/PWM output (master)
Down count
0 1 0 Capture mode
Input pulse interval measurement/Two-
channel input with one-shot pulse output
function (slave)
Up count
0 1 1 Event counter mode External event counter Down count
1 0 0 One-count mode
Delay counter/One-shot pulse output/Two-
channel input with one-shot pulse output
function (master)/PWM output (slave)
Down count
1 1 0
Capture & one-count
mode
Measurement of high-/low-level width of
input signal
Up count
Other than above Setting prohibited
The operation of each mode changes depending on the operation of MD0n0 bit (refer to the table below).
Operation mode
(Value set by the MD0n3 to MD0n1 bits)
MD
0n0
Setting of starting counting and interrupt
• Interval timer mode
Note 2
(0, 0, 0)
• Capture mode
(0, 1, 0)
0
Timer interrupt is not generated when counting is started
(timer output does not change, either).
1
Timer interrupt is generated when counting is started
(timer output also changes).
• Event counter mode
Note 2
(0, 1, 1)
0
Timer interrupt is not generated when counting is started
(timer output does not change, either).
• One-count mode
Note 1
(1, 0, 0)
0
Start trigger is invalid during counting operation.
At that time, a timer interrupt is not generated.
1
Start trigger is valid during counting operation
Note 2
.
At that time, a timer interrupt is not generated.
• Capture & one-count mode
(1, 1, 0)
0
Timer interrupt is not generated when counting is started
(timer output does not change, either).
Start trigger is invalid during counting operation.
At that time, a timer interrupt is not generated.
Other than above Setting prohibited