R01UH0823EJ0100 Rev.1.00
Page 525 of 1823
Jul 31, 2019
RX23W Group
23. Multi-Function Timer Pulse Unit 2 (MTU2a)
23.3.2
Synchronous Operation
In synchronous operation, the values in multiple TCNT counters can be modified simultaneously (synchronous setting).
In addition, multiple TCNT counters can be cleared simultaneously (synchronous clearing) by making the appropriate
setting in the TCR register.
Synchronous operation increases the number of the TGR registers assigned to a single time base.
MTU0 to MTU4 can all be designated for synchronous operation.
(1) Example of Synchronous Operation Setting Procedure
shows an example of the synchronous operation setting procedure.
Figure 23.12
Example of Synchronous Operation Setting Procedure
No
Yes
[1]
[3]
[5]
[4]
[5]
[2]
Synchronous clearing
Counter clearing
Synchronous setting
Start count
Start count
Set synchronous
counter clearing
Select counter
clearing source
Clearing
source generation
channel?
Synchronous clearing
Synchronous setting
Set TCNT
Set synchronous
operation
Synchronous operation
selection
[1] Set 1 in the TSYR.SYNCn bit (n = 0 to 4) corresponding to the channels to be designated for synchronous
operation.
[2] When the TCNT counter of any of the channels designated for synchronous operation is written to, the same
value is simultaneously written to the other TCNT counters.
[3] Use the TCR.CCLR[2:0] bits to specify TCNT clearing by input capture/output compare, etc.
[4] Use the TCR.CCLR[2:0] bits to designate synchronous clearing for the counter clearing source.
[5] Set 1 in the TSTR.CSTn bit for the relevant channels, to start the count operation.