RX610 Group
15. 16-Bit Timer Pulse Unit (TPU)
R01UH0032EJ0120 Rev.1.20
Page 490 of 1006
Feb 20, 2013
15.3.2
Synchronous Operation
In synchronous operation, the values in multiple TPUm.TCNT counters can be rewritten simultaneously (synchronous
presetting). Also, multiple TCNT counters can be cleared simultaneously (synchronous clearing) by making the
appropriate setting in TPUm.TCR.
Synchronous operation enables TPUm.TGRy to be incremented with respect to a single time base.
TPU0 to TPU5 (TPU6 to TPU11) can all be set for synchronous operation.
(1)
Example of Synchronous Operation Setting Procedure
Figure 15.11 shows an example of the synchronous operation setting procedure.
Set synchronous operation
Synchronous operation
selection
Set TCNT
Synchronous presetting
<Synchronous presetting>
Synchronous clearing
Select counter clearing
source
<Counter clearing>
Start count
Set synchronous counter
clearing
<Synchronous clearing>
Start count
Clearing source
generation channel?
No
Yes
[1]
[2]
[3]
[5]
[4]
[5]
Set the SYNCj bit in TSYRy corresponding to the channels to be set for synchronous operation to 1 (y = A, B, j = 0 to 5).
[1]
When any of TCNT of the channels set for synchronous operation is written to, the same value is simultaneously written
to the other TCNT counters.
[2]
Use the CCLR[2:0] bits in TCR to specify TCNT clearing by input capture/output compare, etc.
[3]
Use the CCLR[2:0] bits in TCR to specify synchronous clearing for the counter clearing source.
[4]
Set the CSTj bit in TSTRy for the relevant channels to 1 to start count operation (y = A, B, j = 0 to 5).
[5]
Figure 15.11 Example of Synchronous Operation Setting Procedure