Datasheet

Table Of Contents
Section 14 16-Bit Timer Pulse Unit (TPU)
Rev. 2.00 Jul. 04, 2007 Page 296 of 692
REJ09B0309-0200
14.5.2 Synchronous Operation
In synchronous operation, the values in multiple TCNT counters can be rewritten simultaneously
(synchronous presetting). Also, multiple TCNT counters can be cleared simultaneously by making
the appropriate setting in TCR (synchronous clearing).
Synchronous operation enables TGR to be incremented with respect to a single time base.
Synchronous operation can be set for each channel.
(1) Example of Synchronous Operation Setting Procedure
Figure 14.13 shows an example of the synchronous operation setting procedure.
No
Yes
Synchronous operation
selection
Set synchronous
operation
Synchronous presetting
Set TCNT
<Synchronous presetting> <Counter clearing> <Synchronous clearing>
Synchronous clearing
Clearing
source generation
channel?
Select counter
clearing source
Start count
Set synchronous
counter clearing
Start count
Set 1 to the SYNC bits in TSYR corresponding to the channels to be designated for synchronous
operation.
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.
Use bits CCLR1 and CCLR0 in TCR to specify TCNT clearing by input capture/output compare,
etc.
Use bits CCLR1 and CCLR0 in TCR to designate synchronous clearing for the counter clearing
source.
Set 1 to the CST bits in TSTR for the relevant channels, to start the count operation.
[1]
[2]
[3]
[4]
[5]
[1]
[3]
[5]
[4]
[5]
[2]
Figure 14.13 Example of Synchronous Operation Setting Procedure