Product Info

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 669 of 1852
Nov 30, 2020
RX23W Group 25. 16-Bit Timer Pulse Unit (TPUa)
25.2 Register Descriptions
25.2.1 Timer Control Register (TCR)
Note 1. Bit 7 is reserved in TPU1, TPU2, TPU4, and TPU5. These bits are read as 0. The write value should be 0.
TPUm.TCR settings should be made while TPUm.TCNT operation is stopped.
TPSC[2:0] Bits (Timer Prescaler Select)
These bits select the TCNT 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 port direction register (PDR) for the corresponding pin
to 0 (input port), and set the bit in the port mode register (PMR) to 1 (uses the pin as an I/O port for peripheral functions).
For details, see
section 21, 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. Both edges of PCLK/4 =
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.
Address(es): TPU0.TCR 0008 8110h, TPU1.TCR 0008 8120h, TPU2.TCR 0008 8130h,
TPU3.TCR 0008 8140h, TPU4.TCR 0008 8150h, TPU5.TCR 0008 8160h
b7 b6 b5 b4 b3 b2 b1 b0
CCLR[2:0] CKEG[1:0] TPSC[2:0]
Value after reset:
00000000
Bit Symbol Bit Name Description R/W
b2 to b0 TPSC[2:0] Timer Prescaler Select See Table 25.4 to Table 25.9. R/W
b4, b3 CKEG[1:0] Input Clock Edge Select See Table 25.10. R/W
b7 to b5 CCLR[2:0] Counter Clear Source Select*
1
See Table 25.11 and Table 25.12. R/W