Pulse 280 Specifications Page 23

  • Download
  • Add to my manuals
  • Print
  • Page
    / 42
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 22
www.ti.com
Operational Description of HRPWM
Example 4. SFO Function Calls
main()
{
// User code
// Case1: ePWM1,2,3,4 are running in HRPWM mode
SFO_MepEn(1); // Each of these of function enables
SFO_MepEn(2); // the respective MEP diagnostic logic
SFO_MepEn(3); // and returns MEP Scale factor value
SFO_MepEn(4);
MEP_ScaleFactor1 = MEP_ScaleFactor[1]; // used for ePWM1
MEP_ScaleFactor2 = MEP_ScaleFactor[2]; // used for ePWM2
MEP_ScaleFactor3 = MEP_ScaleFactor[3]; // used for ePWM3
MEP_ScaleFactor4 = MEP_ScaleFactor[4]; // used for ePWM4
// Case2:ePWM1,2,3 only are running in HRPWM mode.
One of the ePWM channel(as an example ePWM4) is used as for
Scale factor calibration
// Here minimum duty cycle limitation is 3 clock cycles.
//
// HRPWM 4 MEP diagnostics circuit is used to estimate the MEP steps
// with the assumption that all HRPWM channels behave similarly
// though may not be identical.
SFO_MepDis(4); // MEP steps using ePWM4
MEP_ScaleFactor1 = MEP_ScaleFactor[4]; // used for ePWM1
MEP_ScaleFactor2 = MEP_ScaleFactor1 // used for ePWM2
MEP_ScaleFactor3 = MEP_ScaleFactor1 // used for ePWM3
MEP_ScaleFactor4 = MEP_ScaleFactor1 // used for ePWM4
2.5 HRPWM Examples Using Optimized Assembly Code
The best way to understand how to use the HRPWM capabilities is through two real examples:
1. Simple buck converter using asymmetrical PWM (i.e. count-up) with active high polarity.
2. DAC function using simple R+C reconstruction filter.
The following examples all have Initialization/configuration code written in C. To make these easier to
understand, the #defines shown below are used. Note, #defines introduced in TMS320x280x Enhanced
Pulse Width Modulator (ePWM) Module Reference Guide (literature number SPRU791) are also used.
Example 5 This example assumes MEP step size of 150 ps and does not use the SFO library.
23
SPRU924F April 2005 Revised October 2011 High-Resolution Pulse Width Modulator (HRPWM)
Submit Documentation Feedback
Copyright © 20052011, Texas Instruments Incorporated
Page view 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 41 42

Comments to this Manuals

No comments