
ML66517 Family User’s Manual
Chapter 10
3-Phase PWM Function
10 – 20
(10) 3-Phase PWM Control Register 0 (PW3CON0)
Set bit 0 (PW3MOD0) to “1” and reset bit 1 (PW3MOD1) to “0” to select mode 2 as the operating mode of
the 3-phase PWM function. Set bit 2 (CRLD0) to “1” to specify that PW3nBFR (n = U, V, W) will be
loaded into PW3nR (n = U, V, W) when PW3C matches PW3CYR. If output pattern switching is to be
performed by software, reset bit 4 (WOTSEL) to “0”, or if to be performed by the compare-match signal,
set bit 4 (WOTSEL) to “1”. Set bit 5 (WOTE) to “1” to enable 3-phase PWM output.
If
INACT is to be used, enable or disable pin input with bit 6 (EINACTB).
(11) 3-Phase PWM Control Register 1 (PW3CON1)
Specify the count clock for the 3-phase PWM counter (PW3C) with bits 0 and 1 (PW3CK0, PW3CK1).
Reset bit 2 (PW3CSEL) to “0” to select the up-counter mode of the 3-phase PWM counter.
The 3-phase PWM counter (PW3C) begins operation when bit 3 (PW3CRUN) is set to “1”. If reset to “0”,
counting is halted.
10.3.2.6 Mode 3 Setting Example
The waveform obtained is basically the same as that of mode 2, however this mode does operate the dead time
timer. This prevents the external transistors connected to the positive phase (PWMU, PWMV, PWMW) and
reverse phase (PWMUB, PWMVB, PWMWB) pins from turning ON at the same time as the PWM output
pattern is switched. The example setting listed below configures PW3C as an up-counter and sets the active level
as “l(fā)ow-level”.
An operating example is described in section 10.4.2.4.
(1) External Interrupt Control Register 1 (EXI1CON)
If 3-phase PWM is to be used, write 55H to EXI1CON.
(2) Port 16 Mode Register (P16IO)
Set bits 0 though 5 (P16IO0 to P16IO5) to “1” to configure each 3-phase PWM output pin (PWMU,
PWMUB, PWMV, PWMVB, PWMW, PWMWB) as an output.
If
INACT is to be used, reset bit 6 (P16IO6) to “0” to configure the port as an input.
(3) Port 16 Secondary Function Control Register (P16SF)
Set bits 0 though 5 (P16SF0 to P16SF5) to “1” to configure each 3-phase PWM output pin (PWMU,
PWMUB, PWMV, PWMVB, PWMW, PWMWB) as a secondary function output.
If
INACT is to be used, specify with bit 6 (P16SF6) whether the INACT input will be pulled-up.
(4) 3-Phase PWM Cycle Buffer Register (PW3CYBFR)
Set the PWM cycle.
While the 3-phase PWM counter is halted, writing to PW3CYBFR causes the same value to be
simultaneously and automatically written to the 3-phase PWM cycle register (PW3CYR).
(5) Duty Setting Buffer Registers (PW3nBFR: n = U, V ,W)
Set the duty value for each phase.
While the 3-phase PWM counter is halted, writing to PW3nBFR causes the same value to be
simultaneously and automatically written to the duty setting registers (PW3nR: n = U, V, W).
(6) Dead Time Timer (DTMR)
Set the value to be loaded into the dead time timer when the dead time timer is activated.
(7) 3-Phase Output State Setting Buffer Register (OTST3BFR)
To set the 3-phase PWM output pins (PWMU, PWMUB, PWMV, PWMVB, PWMW, and PWMWB) as
PWM outputs, reset the corresponding bits to “0”. To set as level outputs, set the corresponding bits to “1”.
While the 3-phase PWM counter is halted, writing to OTST3BFR causes the same value to be
simultaneously and automatically written to the 3-phase output state setting register (OTST3R).