R01UH0823EJ0100 Rev.1.00
Page 611 of 1823
Jul 31, 2019
RX23W Group
23. Multi-Function Timer Pulse Unit 2 (MTU2a)
23.7
MTU Output Pin Initialization
23.7.1
Operating Modes
The MTU has the following six operating modes. Waveforms can be output in any of these modes.
Normal mode (MTU0 to MTU4)
PWM mode 1 (MTU0 to MTU4)
PWM mode 2 (MTU0 to MTU2)
Phase counting modes 1 to 4 (MTU1 and MTU2)
Complementary PWM mode (MTU3 and MTU4)
Reset-synchronized PWM mode (MTU3 and MTU4)
This section describes how to initialize the MTU output pins in each of these modes.
23.7.2
Operation in Case of Re-Setting Due to Error during Operation
If an error occurs during MTU operation, MTU output should be cut off by the system. For an I/O port that is shut down,
set the port direction registers (PDR), the port output data register (PODR), and the port mode register (PMR) to switch
the port pins to be general output pins and for output of the non-active level. Set the TIOR for the MTU pins to disable
output. Set the TOER register for the complementary PWM output pins (MTIOC3B, MTIOC3D, MTIOC4A,
MTIOC4B, MTIOC4C, and MTIOC4D). For PWM output pins, output can also be cut by hardware, using port output
enable 2(POE). The pin initialization procedures for re-setting due to an error during operation and the procedures for
restarting in a different mode after re-setting are described below.
The MTU has six operating modes, as stated above. There are thus 36 mode transition combinations, but some transitions
are not available with certain channel and mode combinations. Available mode transition combinations are listed in
.
Note that the following notations are used for operating modes.
Normal: Normal mode
PWM1: PWM mode 1
PWM2: PWM mode 2
PCM: Phase counting modes 1 to 4 CPWM: Complementary PWM mode RPWM: Reset-synchronized PWM mode
Table 23.56
Mode Transition Combinations
Normal
PWM1
PWM2
PCM
CPWM
RPWM
Normal
PWM1
PWM2
Not available
Not available
PCM
Not available
Not available
CPWM
Not available
Not available
RPWM
Not available
Not available