![](http://datasheet.mmic.net.cn/30000/MC9S12XF512J0VLHR_datasheet_2373534/MC9S12XF512J0VLHR_939.png)
Chapter 20 Pulse Width Modulator with Fault Protection (PMF15B6C) Module
MC9S12XF - Family Reference Manual, Rev.1.19
Freescale Semiconductor
939
software is responsible for calculating both compensated PWM values prior to placing them in an odd-
numbered/even numbered PWM register pair. Either the odd or the even PMFVAL register controls the
pulse width at any given time. For a given PWM pair, whether the odd or even PMFVAL register is active
depends on either:
The state of the current status pin, ISx, for that driver
The state of the odd/even correction bit, IPOLx, for that driver
To correct deadtime distortion, software can decrease or increase the value in the appropriate
PMFVAL register.
In edge-aligned operation, decreasing or increasing the PWM value by a correction value equal to
the deadtime typically compensates for deadtime distortion.
In center-aligned operation, decreasing or increasing the PWM value by a correction value equal
to one-half the deadtime typically compensates for deadtime distortion.
In the complementary channel operation, ISENS selects one of three correction methods:
Manual correction
Automatic current status correction during deadtime
Automatic current status correction when the PWM counter value equals the value in the PWM
counter modulus registers
NOTE
Assume the user will provide current status sensing circuitry causing the
voltage at the corresponding input pin to be low for positive current and high
for negative current. In addition, it assumes the top PWMs are PWM 0, 2,
and 4 while the bottom PWMS are PWM 1, 3, and 5.
20.4.5.2
Manual Correction
The IPOLx bits select either the odd or the even PWM value registers to use in the next PWM cycle.
Table 20-37. Correction Method Selection
ISENS
Correction Method
00
No correction(1)
1. The current status pins can be used as general purpose input/output ports.
01
Manual correction
10
Current status sample correction on pins IS0, IS1, and IS2 during deadtime(2)
2. The polarity of the ISx pin is latched when both the top and bottom PWMs are off. At the 0%
and 100% duty cycle boundaries, there is no deadtime, so no new current value is sensed.
11
Current status sample on pins IS0, IS1, and IS2(3)
At the half cycle in center-aligned operation
At the end of the cycle in edge-aligned operation
3. Current is sensed even with 0% or 100% duty cycle.