FILE: hrpwm_ex4_duty_updown_sfo.c
This example calls the following TI's MEP Scale Factor Optimizer (SFO) software library V8 functions:
int SFO();
- updates MEP_ScaleFactor dynamically when HRPWM is in use
- updates HRMSTEP register (exists only in EPwm1Regs register space) with MEP_ScaleFactor value
- returns 2 if error: MEP_ScaleFactor is greater than maximum value of 255 (Auto-conversion may not function properly under this condition)
- returns 1 when complete for the specified channel
- returns 0 if not complete for the specified channel
This example is intended to explain the HRPWM capabilities. The code can be optimized for code efficiency. Refer to TI's Digital power application examples and TI Digital Power Supply software libraries for details.
External Connections
- Monitor ePWM1/2/3/4 A/B pins on an oscilloscope.