RX610 Group
15. 16-Bit Timer Pulse Unit (TPU)
R01UH0032EJ0120 Rev.1.20
Page 488 of 1006
Feb 20, 2013
Figure 15.8 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.
Time
Toggle-output
Toggle-output
Counter cleared by TGRB compare match
TCNT value
FFFFn
0000h
TIOCA
TIOCB
TGRA
TGRB
Figure 15.8 Example of Toggle Output Operation
(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 11)
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
counter input clock or compare match signal of TPU0, TPU1, TPU3, and TPU4 (TPU6, TPU7, TPU9, and TPU10) as the
input capture source.
Note: When another channel's counter input clock is used as the input capture input for TPU0 and TPU3 (TPU6 and
TPU9), PCLK/1 should not be selected as the counter input clock used for input capture input. Input capture will
not be generated if PCLK/1 is selected.
(a)
Example of setting procedure for input capture operation
Figure 15.9 shows an example of the setting procedure for input capture operation.
Select input capture input
Input selection
Start count
<Input capture operation>
Set TGRy as an input capture register
by TIOR, and select the input capture
source and input signal edge (rising
edge, falling edge, or both edges (y =
A to D)).
[1]
[1]
[2]
Set the CSTj bit in TSTRy to 1 to start
count operation (y = A, B, j = 0 to 5).
[2]
Figure 15.9 Example of Setting Procedure for Input Capture Operation