Specifications
T
pwm
= 1000 ns
EPWM1A
0
100
60 ns
30 ns
(F
pwm
= 1 MHz)
3 6
SYSCLKOUT = 100 MHz
Operational Description of HRPWM
www.ti.com
Figure 7. High % Duty Cycle Range Limitation Example when PWM Frequency = 1 MHz
2.4 Scale Factor Optimizing Software (SFO)
The micro edge positioner (MEP) logic is capable of placing an edge in one of 255 discrete time steps. As
previously mentioned, the size of these steps is on the order of 150 ps (see device-specific data sheet for
typical MEP step size on your device). The MEP step size varies based on worst-case process
parameters, operating temperature, and voltage. MEP step size increases with decreasing voltage and
increasing temperature and decreases with increasing voltage and decreasing temperature. Applications
that use the HRPWM feature should use the TI-supplied MEP scale factor optimizer (SFO) software
function. The SFO function helps to dynamically determine the number of MEP steps per SYSCLKOUT
period while the HRPWM is in operation.
To utilize the MEP capabilities effectively during the Q15 duty to [CMPA:CMPAHR] mapping function (see
Section 2.3.2), the correct value for the MEP scaling factor (MEP_ScaleFactor) needs to be known by the
software. To accomplish this, each HRPWM module has built in self-check and diagnostics capabilities
that can be used to determine the optimum MEP_ScaleFactor value for any operating condition. TI
provides a C-callable library containing two SFO functions that utilize this hardware and determines the
optimum MEP_ScaleFactor. As such, MEP Control and Diagnostics registers are reserved for TI use.
Currently, there are two released versions of the SFO library - SFO_TI_Build.lib and SFO_TI_Build_V5.lib.
Versions 2, 3, and 4 were TI Internal only. A detailed description of the SFO_TI_Build.lib software
functions follows below.
NOTE: Information on the SFO_TI_Build_V5.lib software functions, which support up to 16 HRPWM
channels, can be found in Appendix A, along with a high-level comparison table between the two library
versions.
Table 6 provides functional descriptions of the two SFO library routines in SFO_TI_Build.lib.
Table 6. SFO Library Routines
Function Description
SFO_MepDis(n) Scale Factor Optimizer with MEP Disabled
This routine runs faster, as the calibration logic works when HRPWM capabilities are disabled; therefore,
HRPWM capabilities cannot be run concurrently when the ePWMn is being used.
If SYSCLKOUT = TBCLK = 100 MHz and assuming MEP steps size is 150 ps
Typical value at 100 MHz = 66 MEP steps per unit TBCLK (10 ns)
The function returns a value in the variable array:
MEP_ScaleFactor[n] = Number of MEP steps/SYSCLKOUT
If TBCLK is not equal to SYSCLKOUT, then the returned value must be adjusted to reflect the correct TBCLK:
MEP steps per TBCLK = MEP_ScaleFactor[n] * (SYSCLKOUT/TBCLK)
(1)
Example: If TBCLK =SYSCLKOUT/2,
(1)
n is the ePWM module number on which the SFO function operates.
e.g., n = 1, 2, 3, or 4 for the F2808. Check your device data manual for device configurations.
18
High-Resolution Pulse Width Modulator (HRPWM) SPRU924F– April 2005– Revised October 2011
Submit Documentation Feedback
Copyright © 2005–2011, Texas Instruments Incorporated