Specifications
Space Vector PWM
6-63
Event Manager (EV)
Software
To generate space vector PWM outputs, the user software must:
- Configure ACTRx to define the polarity of the compare output pins
- Configure COMCONx to enable compare operation and space vector
PWM mode, and set the reload condition for CMPRx to be underflow
- Put GP timer 1 (or GP timer 3) in continuous up-/down-counting mode to
start the operation
The user software then needs to determine the voltage U
out
to be applied to
the motor phases in the two dimensional d-q plane, decompose U
out,
and per-
form the following for each PWM period:
- Determine the two adjacent vectors, U
x
and U
x+60
-
Determine the parameters T
1
, T
2
, and T
0
-
Write the switching pattern corresponding to U
x
in ACTRx[14–12] and 1
in ACTRx[15], or the switching pattern of U
x+60
in ACTRx[14–12] and 0 in
ACTRx[15]
- Put (1/2 T1) in CMPR1 and (1/2 T1 + 1/2 T2) in CMPR2
Space Vector PWM Hardware
The space vector PWM hardware in the EV module does the following to com-
plete a space vector PWM period:
- At the beginning of each period, sets the PWM outputs to the (new) pattern
U
y
defined by ACTRx[14–12]
- On the first compare match during up-counting between CMPR1 and GP
timer 1 at (1/2 T1), switches the PWM outputs to the pattern of U
y+60
if
ACTRx[15] is 1, or to the pattern of U
y
if ACTRx[15] is 0 (U
0–60
= U
300
,
U
360+60
= U
60
)
- On the second compare match during up-counting between CMPR2 and
GP timer 1 at (1/2 T1 + 1/2 T2), switches the PWM outputs to the pattern
(000) or (111), whichever differs from the second pattern by one bit
- On the first compare match during down-counting between CMPR2 and
GP timer 1 at (1/2 T1 + 1/2 T2), switches the PWM outputs back to the sec-
ond output pattern
- On the second compare match during down-counting between CMPR1
and GP timer 1 at (1/2 T1), switches the PWM outputs back to the first pat-
tern










