English
Language : 

SH7730 Datasheet, PDF (559/1188 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7780 Series
Figure 16.4 illustrates periodic counter operation.
Section 16 16-Bit Timer Pulse Unit (TPU)
TPUn_TCNT value
TGRA
Counter cleared by TPUn_TGRA
compare match
H'0000
CST bit
TGFA
Time
Flag cleared by software
Figure 16.4 Periodic Counter Operation
(2) Waveform Output by Compare Match
The TPU can perform 0-, 1-, or toggle-output from the output pins (TPUn_TO0 to TPUn_TO3
pins) using a TPUn_TGRA compare match.
(a) Example of setting procedure for waveform output by compare match
Figure 16.5 shows an example of the setting procedure for waveform output by a compare match.
Output selection
Select waveform output mode [1]
Set output timing
[2]
Set external pin function
[3]
Start count
[4]
[1] Select initial value from 0-output or 1-output,
and compare match output value from 0-output,
1-output, or toggle-output, by means of TPUn_TIOR.
The set initial value is output on the TPUn_TO0 to
TPUn_TO3 pins until the first compare match occurs.
[2] Set the timing for compare match generation in
TPUn_TGRA.
[3] Set external pin function by pin function controller
(PFC).
[4] Set the CST bit in TPUn_TSTR to 1 to start the count
operation.
<Waveform output>
Figure 16.5 Example of Setting Procedure for Waveform Output by Compare Match
Rev. 1.00 Sep. 19, 2007 Page 511 of 1136
REJ09B0359-0100