Specifications

SFO Library Version Comparison
www.ti.com
Table 13. SFO V5 Library Routines
Function Description
int SFO_MepDis_V5(n) Scale Factor Optimizer V5 with MEP Disabled
This routine is very similar to the SFO_MepDis() routine in the original SFO library, but with one
change. It now returns a 1 when MEP-disabled calibration is complete, or a 0 while calibration is still
running.
This function runs faster than the SFO_V5() routine and cannot be used on an ePWM channel while
HRPWM capablities are enabled for that channel. If there is a spare ePWM channel available in the
system. SFO_MepDis_V5() can be run for that channel, and the resulting MEP_ScaleFactor[n] value
can be copied into the MEP_ScaleFactor[n] for all other channels.
If SYSCLKOUT = TBCLK =100 MHz and assuming the MEP step size is 150 ps:
Typical value at 100 MHz = 66 MEP steps per unit TBCLK (10 ns)
The funtion 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 TBCLKK =MEP_ScaleFactor[n] * (SYSCLKOUT/TBCLK)
Example: If TBCLK = SYSCLKOUT/2,
MEP steps per TBCLK = MEP_ScaleFactor[n] * (100/50) = 66 *2 = 132
Constraints when using this function:
SFO_MepDis_V5(n) can be used with SYSCLKOUT from 50 MHz to maximum SYSCLK
frequency. MEP diagnostics logic uses SYSCLKOUT and not TBCLK. Hence, the
SYSCLKOUT restriction is an important constraint.
If TBCLK does not equal SYSCLKOUT, the TBCLK frequency must be great enough so that
MEP steps per TBCLK do not exceed 255. This is due to the restriction that there can be no
more than 255 MEP steps in a coarse step. For this reason it is highly recommended that
TBCLK=SYSCLKOUT.
This function cannot be run on an ePWM channel with HRPWM capabilities enabled. Running
the SFP_MepDis_V5 function continuously in an application will generate an inaccurate
waveform on the HRPWM channel output pin.
Usage:
If one of the ePWM modules is running in normal ePWM mode, then it can be used to run the
SFO diagnostics function. Here, the single MEP_ScaleFactor value obtained for that channel
can be copied and used as the MEP_ScaleFactor for the other ePWM modules which are
running HRPWM modules' MEP steps are similar but may not be identical.
This routine returns a 1 when calibration is finished on the specified channel or a 0 if calibration
is still running.
The ePWM module that is not active in HRPWM mode is still fully operational in conventional
PWM mode and used to drive PWM pins. The SFO function only makes ise of the MEP
diagnostics logic in the HRPWM circuitry.
SFO_MepDis_V5(n) function does not require a starting Scale Factor value.
The other ePWM modules operating in HRPWM mode incur only a 3-cycle minimum duty cycle
limitation.
int SFO_MepEn_V5(n) Scale Factor Optimizer V5 with MEP Enabled
This function runs slower that the SFO_MepDis_V5() routine and runs SFO diagnostics on an
ePWM channel with HRPWM capabilities enabled for that channel.
If SYSCLK = TBCLK = 100MHz, and assuming MEP step 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
=Number of MEP steps/TBCLK
34
SFO Library Software - SFO_TI_Build_V5.lib SPRU924F April 2005 Revised October 2011
Submit Documentation Feedback
Copyright © 20052011, Texas Instruments Incorporated