R01UH0822EJ0100 Rev.1.00
Page 512 of 1041
Jul 31, 2019
RX13T Group
19. Multi-Function Timer Pulse Unit 3 (MTU3c)
(13) Operation When Error Occurs in PWM Mode 2 and Operation is Restarted in Normal Mode
shows a case in which an error occurs in PWM mode 2 and operation is restarted in normal mode after
re-setting.
Figure 19.155
Error Occurrence in PWM Mode 2, Recovery in Normal Mode
(1) After a reset, the MTU output goes low and the ports enter high-impedance state.
(2) Set PWM mode 2.
(3) Initialize the pins with the TIOR register. (In the example, the initial output is a high level, and a low level is output
on compare match occurrence. In PWM mode 2, the pin that corresponds to the TGR register used as a period
register is not initialized. In the example, the MTUn.TGRA register is used as a period register.)
(4) Set MTU output using the MPC and port mode registers (PMR) corresponding to the I/O ports.
(5) Start count operation by setting the TSTRA register.
(6) Output goes low on compare match occurrence.
(7) An error occurs.
(8) Allow non-active level output by setting the pins as general output ports using the port direction registers (PDR),
port output data registers (PODR), and port mode registers (PMR) of the I/O ports.
(9) Stop count operation by setting the TSTRA register.
(10) Set normal mode.
(11) Initialize the pins with the TIOR register.
(12) Set MTU output using the MPC and port mode registers (PMR) corresponding to the I/O ports.
(13) Restart operation by setting the TSTRA register.
MTU module output
Hi-Z
(1)
Reset
(2)
TMDR
(PWM2)
(3)
TIOR
(1 init
0 out)
(5)
TSTR
(1)
(6)
Match
(8)
Error
occurs
(9)
Port
output
(9)
TSTR
(0)
(10)
TMDR
(normal)
(11)
TIOR
(1 init
0 out)
(13)
TSTR
(1)
PORT output
Pxx
Pxx
MTIOCnA
MTIOCnB
Hi-Z
(4)
MPC
(MTU)
(12)
MPC
(MTU)
Not initialized (period register)