R01UH0823EJ0100 Rev.1.00
Page 689 of 1823
Jul 31, 2019
RX23W Group
25. 16-Bit Timer Pulse Unit (TPUa)
25.3.2
Synchronous Operation
In synchronous operation, the values in multiple TPUm.TCNT can be rewritten simultaneously (synchronous setting).
Also, multiple TCNT 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 can all be set for synchronous operation.
(1) Example of Synchronous Operation Setting Procedure
shows an example of the synchronous operation setting procedure.
Figure 25.10
Example of Synchronous Operation Setting Procedure
Set synchronous operation
Synchronous operation
selection
Set TCNT
Synchronous setting
<Synchronous setting>
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]
[1] Set the TPU.TSYR.SYNCj bit (j = 0 to 5) corresponding to the channels to be set for synchronous operation to 1.
[2] When any of TCNT of the channels set for synchronous operation is written to, the same value is simultaneously written to
the other TCNT.
[3] Use the CCLR[2:0] bits in TCR to specify TCNT clearing by input capture/output compare, etc.
[4] Use the CCLR[2:0] bits in TCR to specify synchronous clearing for the counter clearing source.
[5] Set the TPU.TSTR.CSTj bit (j = 0 to 5) corresponding to the target channel to 1 to start the counter operation.