R01UH0823EJ0100 Rev.1.00
Page 686 of 1823
Jul 31, 2019
RX23W Group
25. 16-Bit Timer Pulse Unit (TPUa)
shows an example of toggle output.
In this example, TPUm.TCNT has been set as a periodic counter (with counter clearing performed by compare match B),
and settings have been made so that output is toggled by both compare match A and compare match B.
Figure 25.7
Example of Toggle Output Operation (n = 3, 4)
(3) Input Capture Function
The TPUm.TCNT value can be transferred to TPUm.TGRy on detection of the TIOCyn pin (y = A to D; n = 0 to 5) input
edge.
The rising edge, the falling edge, or both edges can be selected as the detection edge. It is also possible to specify the
count clock or compare match signal of TPU0, TPU1, TPU3, and TPU4 as the input capture source. Noise filtering can
be applied to the input capture input.
Note:
Even if the counter is halted, an input capture is generated, and flag and interrupt signals are generated.
Note:
When another channel's count clock is used as the input capture input for TPU0 and TPU3, PCLK/1 should not
be selected as the count clock used for input capture input. Input capture will not be generated if PCLK/1 is
selected.
Time
Toggle output
Toggle output
Counter cleared by TGRB compare match
TCNT value
FFFFn
0000h
TIOCAn
TIOCBn
TGRA
TGRB