English
Language : 

SH7108 Datasheet, PDF (194/560 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
Section 8 Multifunction Timer Pulse Unit (MTU)
When compare match is selected as the TCNT clearing source, the TCNT counter for the relevant
channel performs periodic count operation. The TGR register for setting the period is designated
as an output compare register, and counter clearing by compare match is selected by means of bits
CCLR0 to CCLR2 in TCR. After the settings have been made, TCNT starts up-count operation as
a periodic counter when the corresponding bit in TSTR is set to 1. When the count value matches
the value in TGR, the TGF bit in TSR is set to 1 and TCNT is cleared to H'0000.
If the value of the corresponding TGIE bit in TIER is 1 at this point, the TPU requests an interrupt.
After a compare match, TCNT starts counting up again from H'0000.
Figure 8.5 illustrates periodic counter operation.
TCNT value
TGR
Counter cleared by TGR
compare match
H'0000
CST bit
TGF
Time
Flag cleared by software
Figure 8.5 Periodic Counter Operation
Waveform Output by Compare Match
The MTU can perform 0, 1, or toggle output from the corresponding output pin using compare
match.
Example of Setting Procedure for Waveform Output by Compare Match: Figure 8.6 shows
an example of the setting procedure for waveform output by compare match
Rev.1.00 Sep. 18, 2008 Page 160 of 522
REJ09B0069-0100