English
Language : 

SH7730 Datasheet, PDF (564/1188 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC engine Family / SH7780 Series
Section 16 16-Bit Timer Pulse Unit (TPU)
(1) Example of PWM Mode Setting Procedure
Figure 16.11 shows an example of the PWM mode setting procedure.
PWM mode
Select counter clock
[1]
Select counter clearing source [2]
Select waveform output level [3]
[1] Select the counter clock with bits TPSC[2:0] in TPUn_TCR.
At the same time, select the input clock edge with bits
CKEG[1:0] in TPUn_TCR.
[2] Use bits CCLR[2:0] in TPUn_TCR to select the TPUn_TGRB
to be used as the TPUn_TCNT clearing source.
[3] Use TPUn_TIOR to select the initial value and output value
Set cycle
[4] [4] Set the cycle in TPUn_TGRB and set the duty in TPUn_TGRA.
Set PWM mode
[5] [5] Select the PWM mode with bits MD[3:0] in TPUn_TMDR.
Set external pin function
[6]
[6] Set external pin function by pin function controller (PFC)
Start count
[7] [7] Set the CST bit in TPUn_TSTR to 1 to start the count operation.
<PWM mode>
Figure 16.11 Example of PWM Mode Setting Procedure
Rev. 1.00 Sep. 19, 2007 Page 516 of 1136
REJ09B0359-0100