RX610 Group
15. 16-Bit Timer Pulse Unit (TPU)
R01UH0032EJ0120 Rev.1.20
Page 501 of 1006
Feb 20, 2013
(2)
Examples of PWM Mode Operation
Figure 15.22 shows an example of PWM mode 1 operation.
In this example, TPUm.TGRA compare match is set as the TPUm.TCNT clearing source, 0 is set for the TGRA initial
output value and output value, and 1 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.
0000h
Counter cleared by TGRA compare match
TGRB
TGRA
Time
TCNT value
TIOCA
Figure 15.22 Example of PWM Mode Operation (1)
Figure 15.23 shows an example of PWM mode 2 operation.
In this example, synchronous operation is specified for TPU0 and TPU1, TPU1.TGRB compare match is set as the
TPUm.TCNT clearing source, and 0 is set for the initial output value and 1 for the output value of the other TPUm.TGRy
registers (TPU0.TGRA to TPU0.TGRD and TPU1.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.
TPU1.TGRB
0000h
TIOCA0
Counter cleared by TPU1.TGRB compare match
Time
TPU1.TGRA
TPU0.TGRD
TPU0.TGRC
TPU0.TGRB
TPU0.TGRA
TIOCB0
TIOCC0
TIOCD0
TIOCA1
TCNT value
Figure 15.23 Example of PWM Mode Operation (2)