RL78/F13, F14 CHAPTER 7 TIMER RJ
R01UH0368EJ0210 Rev.2.10 544
Dec 10, 2015
Figure 7-1. Timer RJ Block Diagram
= 01B
= 10B
= 11B
= 00B
= 01B
= 10B
= 000B
= 001B
= 011B
TSTART, TSTOP: Bits in TRJCR0 register
TEDGSEL, TOENA, TIPF0, TIPF1, TIOGT0, TIOGT1: Bits in TRJIOC0 register
TMOD0 to TMOD2, TEDGPL, TCK0 to TCK2: Bits in TRJMR0 register
RCCPSEL0, RCCPSEL1: Bits in TRJISR0 register
SELLOSC: Bit in CKSEL register
Toggle flip-flop
fCLK
fCLK/8
fCLK/2
TCK2 to TCK0
TRJIO0 pin
TRJO0 pin
TIPF1 and TIPF0
f
CLK
fCLK/8
fCLK/32
TIPF1 and TIPF0
= 01B or 10B
Q
Q
CK
CLR
Write to TRJMR0 register
Write 1 to TSTOP
TEDGSEL = 1
TEDGSEL = 0
TMOD2 to TMOD0 = 001B
TMOD2 to TMOD0
= 011B or 100B
Counter
control
circuit
Measurement
complete signal
= 010B
TMOD2 to
TMOD0
= other than
010B
RCCPSEL1 and
RCCPSEL0
TRDIOD1
= 00B
= 01B
= 10B
= 11B
TRDIOC1
TO02
TO03
One edge/
both edges
switching
Polarity
selection
TEDGPL TEDGSEL
TIOGT1 and TIOGT0
Event is always counted
Event is counted during polarity period specified for INTP4
Event is counted during polarity period specified for timer output signal
16-bit
reload
register
Data bus
Timer
RJ0
interrupt
Underflow signal
16-bit counter
TRJ0
counter
TSTART
= 100B
= 101B
= 110B
fIL
Event input from event link controller
(ELC)
fSL
Digital
filter
TOENA
= 00B
fSUB
fIL
SELLOSC=0
SELLOSC=1
Notes 1. When selecting f
IL as the count source, set the WUTMMCK0 bit in the operation speed mode control register
(OSMC) to 1.
2. The polarity can be selected by the RCCPSEL2 bit in the TRJISR0 register.
3. f
SUB cannot be selected as the count source for timer RJ when fSL (fIL) is selected as the count source for timer
RD or the output clock for clock output/buzzer output.
4. The 20-pin products do not have TRJIO0 and TRJO0 pins.
7.2 I/O Pins
Table 7-2 lists the Timer RJ Pin Configuration.
Table 7-2. Timer RJ Pin Configuration
Pin Name I/O Function
INTP4 Input External input for timer RJ
TRJIO0
Note
Input/output External event input and pulse output for timer RJ
TRJO0
Note
Output Pulse output for timer RJ
Note The 20-pin products do not have TRJIO0 and TRJO0 pins.