RX610 Group
15. 16-Bit Timer Pulse Unit (TPU)
R01UH0032EJ0120 Rev.1.20
Page 463 of 1006
Feb 20, 2013
15.2.1
Timer Control Register (TCR)
Addresses: TPU0.TCR 0008 8110h, TPU1.TCR 0008 8120h, TPU2.TCR 0008 8130h
TPU3.TCR 0008 8140h, TPU4.TCR 0008 8150h, TPU5.TCR 0008 8160h
TPU6.TCR 0008 8180h, TPU7.TCR 0008 8190h, TPU8.TCR 0008 81A0h
TPU9.TCR 0008 81B0h, TPU10.TCR 0008 81C0h, TPU11.TCR 0008 81D0h
b7
b6
b5
b4
b3
b2
b1
b0
0
0
0
0
0
0
0
0
TPSC[2:0]
CCLR[2:0]
CKEG[1:0]
Value after reset:
Bit
Symbol
Bit Name
Description
R/W
b2 to b0 TPSC[2:0]
Timer Prescaler Select
See tables 15.6 to 15.11.
R/W
b4, b3
CKEG[1:0]
Input Clock Edge Select
See table 15.12.
R/W
b7 to b5 CCLR[2:0]
*
Counter Clear Source Select
See tables 15.13 and 15.14.
R/W
Note:
*
Bit 7 in TCR of TPU1, TPU2, TPU4, and TPU5 of unit 0 and bit 7 in TCR of TPU7, TPU8, TPU10, and TPU11
of unit 1 are reserved. These bits are read as 0. The write value should always be 0.
The TPU has twelve TCR registers, one for each channel.
TPUm.TCR controls TPUm.TCNT counter of each channel.
TPUm.TCR settings should be made while TPUm.TCNT counter operation is stopped.
TPSC[2:0] Bits (Timer Prescaler Select)
These bits select the TCNT counter clock. The clock source can be selected independently for each channel.
To select the external clock as the clock source, set the bit in the data direction register (DDR) for the corresponding pin
to 0 (input port), and set the bit in the input buffer control register (ICR) to 1 (input buffer of the corresponding pin is
enabled). For details, see section 14, I/O Ports.
CKEG[1:0] Bits (Input Clock Edge Select)
These bits select the input clock edge.
When the internal clock is counted using both edges, the input clock period is halved (e.g. PCLK/4 both edges = PCLK/2
rising edge).
Internal clock edge selection is valid when the input clock is PCLK/4 or slower. This setting is ignored if the input clock
is PCLK/1, or when overflow/underflow of another channel is selected.
CCLR[2:0] Bits (Counter Clear Source Select)
These bits select the TCNT counter clearing source.