English
Language : 

SH7014 Datasheet, PDF (275/754 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
10. Multifunction Timer Pulse Unit (MTU)
Procedure for Selecting the PWM Mode (Figure 10.23):
1. Set bits TPSC2 to TPSC0 in the TCR to select the counter clock source. At the same time, set
bits CKEG1 and CKEG0 in the TCR to select the desired edge of the input clock.
2. Set bits CCLR2 to CCLR0 in the TCR to select the TGR to be used as a counter clear source.
3. Set the period in the TGR selected in step 2, and the duty cycle in another TGR.
4. Using the timer I/O control register (TIOR), set the TGR selected in step 3 to act as an output
compare register, and select the initial value and output value.
5. Set the MD3 to MD 0 bits in TMDR to select the PWM mode.
6. Set the CST bit in the TSTR to 1 to let the TCNT start counting.
PWM mode
Select counter clock
1
Select counter clear source 2
Select waveform output level 3
Set TGR
4
Select PWM mode
5
Start counting
6
PWM mode
Figure 10.23 Procedure for Selecting the PWM Mode
Rev.5.00 Sep. 27, 2007 Page 241 of 716
REJ09B0398-0500