R01UH0823EJ0100 Rev.1.00
Page 699 of 1823
Jul 31, 2019
RX23W Group
25. 16-Bit Timer Pulse Unit (TPUa)
(2) Examples of PWM Mode Operation
shows an example of PWM mode 1 operation.
In this example, TPUm.TGRA compare match is set as the TPUm.TCNT clearing source, low is set for the TGRA initial
output value and output value, and high is set as the TPUm.TGRB output value.
In this case, the value set in TGRA is used as the cycle, and the value set in TGRB is used as the duty cycle.
Figure 25.21
Example of PWM Mode Operation (1) (n = 3, 4)
shows an example of PWM mode 2 operation.
In this example, synchronous operation is specified for TPU3 and TPU4, TPU4.TGRB compare match is set as the
TPUm.TCNT clearing source, and low is set for the initial output value and high for the output value of the other
TPUm.TGRy registers (TPU3.TGRA to TPU3.TGRD and TPU4.TGRA), to output a 5-phase PWM waveform.
In this case, the value set in TPU1.TGRB is used as the cycle, and the values set in the other TGRy registers are used as
the duty cycle.
Figure 25.22
Example of PWM Mode Operation (2)
0000h
Counter cleared by TGRA compare match
TGRB
TGRA
Time
TCNT value
TIOCAn
TPU4.TGRB
0000h
TIOCA3
Counter cleared by TPU4.TGRB compare match
Time
TPU4.TGRA
TPU3.TGRD
TPU3.TGRC
TPU3.TGRB
TPU3.TGRA
TIOCB3
TIOCC3
TIOCD3
TIOCA4
TCNT value