Renesas RX100 Series User Manual page 405

32-bit mcu
Hide thumbs Also See for RX100 Series:
Table of Contents

Advertisement

RX13T Group
(1) Example of PWM Mode Setting Procedure
Figure 19.25 shows an example of the PWM mode setting procedure.
Enable waveform output
Select count clock
Select counter clearing
Set PWM mode
Select waveform output
Figure 19.25
Example of PWM Mode Setting Procedure
(2) Examples of PWM Mode Operation
Figure 19.26 shows an example of operation in PWM mode 1.
In this example, TGRA compare match is set as the TCNT clearing source, 0 is set as the initial output value and output
value for TGRA, and 1 is set as the output value for TGRB.
In this case, the value set in TGRA is used as the period, and the value set in TGRB is used as the duty ratio.
TCNT value
TGRA
TGRB
0000h
MTIOCnA
Figure 19.26
Example of PWM Mode 1 Operation (n = 0 to 4)
R01UH0822EJ0100 Rev.1.00
Jul 31, 2019
PWM mode
[1]
[2]
[3]
source
[4]
[5]
level
[6]
Set TGR
Start count
[7]
<PWM mode>
19. Multi-Function Timer Pulse Unit 3 (MTU3c)
[1] Enable TOERA output when outputting a waveform
from the MTIOC pin of MTU3 and MTU4.
[2] Select the count clock source with bits TPSC[2:0] in
TCR. At the same time, select the clock edge with
bits CKEG[1:0] in TCR.
[3] Use bits CCLR[2:0] in TCR to select the TGR to be
used as the TCNT clearing source.
[4] Select the PWM mode with bits MD[3:0] in TMDR.
[5] Use TIOR to designate the TGR as an output
compare register, and select the initial value and
output value.
[6] Set the period in the TGR selected in [3], and set the
duty ratio in the other TGR.
[7] Set the CSTn bit in TSTRA to 1 to start the count
operation.
Counter cleared by TGRA compare match
Time
Page 405 of 1041

Advertisement

Table of Contents
loading

Table of Contents