
ML66517 Family User’s Manual
Chapter 10
3-Phase PWM Function
10 – 43
10.4.2.4 Mode 3 Operation Example
Figure 10-33 shows an example of the PWMU output and PWMUB output (U-phase) described in the mode 3
register setting example of section 10.3.2.6 with one output pin configured as a PWM output and another as a
level output, and where the 3-phase PWM counter (PW3C) is reset when an event occurs. PWMV output,
PWMVB output (V-phase), PWMW output, and PWMWB output (W-phase) operate in the same manner.
Output pattern switching can be implemented by the compare-match signal from the compare out module of the
capture/compare timer or by the software. This example is described using the software.
PW3C begins counting when the PW3CRUN bit is set to “1”. PWM waveform generated by PW3C, PW3CYR,
PW3nR (n = U, V, W) and DTMn (n = 1, 2, 3) is output with dead time from the pins configured as PWM
outputs by OTST3R and OUT3R settings. The level set by OUT3R is output from pins configured as level
outputs by OTST3R and OUT3R settings. In this example, the PWMU pin is a PWM output and the PWMUB
pin is a high-level output. The PW3C count advances. When an event such as an external interrupt occurs, within
that interrupt processing routine set OTST3BFR and OUT3BFR, set LDSWOTST to “1”, write 0000H to PW3C,
switch the output pattern, and reset the counter. At that time, the PWMU output setting changes from PWM
output to level output, causing the dead time timer to activate. The PWMU pin is configured as a level output
and outputs a high-level. The PWMUB pin is configured as a PWM output but instead of quickly changing from
a high-level to a low-level, waits until after the dead time timer is halted and then changes to a low-level.
In this manner, external transistors connected to the positive/reverse phase pins are prevented from turning ON at
the same time as the PWM output pattern is switched.