R01UH0823EJ0100 Rev.1.00
Page 619 of 1823
Jul 31, 2019
RX23W Group
23. Multi-Function Timer Pulse Unit 2 (MTU2a)
(8) Operation When Error Occurs in PWM Mode 1 and Operation is Restarted in PWM mode 1
shows a case in which an error occurs in PWM mode 1 and operation is restarted in PWM mode 1 after
re-setting.
Figure 23.123
Error Occurrence in PWM Mode 1, Recovery in PWM Mode 1
(1) to (10) are the same as in
(11) This step is not necessary when restarting in PWM mode 1.
(12) Initialize the pins with the TIOR register. (In PWM mode 1, a waveform is not output on the MTIOCnB
(MTIOCnD) pins. If a level is to be output, make the required general output port settings in the I/O port’s port
direction register (PDR) and port output data register (PODR).)
(13) Use the MPC and the port mode register (PMR) for the I/O port to set up MTU output.
(14) Restart operation by setting the TSTR register.
(9) Operation When Error Occurs in PWM Mode 1 and Operation is Restarted in PWM mode 2
shows a case in which an error occurs in PWM mode 1 and operation is restarted in PWM mode 2 after
re-setting.
Figure 23.124
Error Occurrence in PWM Mode 1, Recovery in PWM Mode 2
(1) to (10) are the same as in
(11) Set PWM mode 2.
(12) Initialize the pins with the TIOR register. (In PWM mode 2, a waveform is not output on the cycle register pins. If a
level is to be output, make the required general output port settings in the I/O port’s port direction register (PDR)
and port output data register (PODR).)
(13) Use the MPC and the port mode register (PMR) for the I/O port to set up MTU output.
(14) Restart operation by setting the TSTR register.
Note:
PWM mode 2 can only be selected for MTU0 to MTU2, and therefore the TOER register setting is not necessary.
(1)
Reset
MTU module output
(2)
TMDR
(PWM1)
(3)
TOER
(1)
(4)
TIOR
(1 init
0 out)
(6)
TSTR
(1)
(7)
Match
(8)
Error
occurs
(9)
Port
output
(10)
TSTR
(0)
(11)
TMDR
(PWM1)
(12)
TIOR
(1 init
0 out)
(14)
TSTR
(1)
PORT output
Pxx
Pxx
MTIOCnA
MTIOCnB
(5)
MPC
(MTU)
(13)
MPC
(MTU)
Hi-Z
Hi-Z
Not initialized (MTIOCnB)
Not initialized (MTIOCnB)
(14)
TSTR
(1)
MTU module output
(1)
Reset
(2)
TMDR
(PWM1)
(3)
TOER
(1)
(4)
TIOR
(1 init
0 out)
(6)
TSTR
(1)
(7)
Match
(8)
Error
occurs
(9)
Port
output
(10)
TSTR
(0)
(11)
TMDR
(PWM2)
(12)
TIOR
(1 init
0 out)
PORT output
Pxx
Pxx
MTIOCnA
MTIOCnB
(5)
MPC
(MTU)
(13)
MPC
(MTU)
Not initialized (MTIOCnB)
Not initialized (cycle register)
Hi-Z
Hi-Z