TMS320x280x, 2801x, 2804x High ResolutionPulse Width Modulator (HRPWM)Reference GuideLiterature Number: SPRU924FApril 2005– Revised October 2011
TBPHSHR (8) Reserved (8)TBPHS (16)0x00020x0003Reserved (8)TBPHSHR (8)TBPHS (16)31 16 15 8 7 0Single 32 bit writeReserved (8)CMPA (16)CMPAHR (8)0x00080
CTR=PRDTBPRD shadow (16)TBPRD active (16)Counterup/down(16 bit)TBCNTactive (16)TBCTL[PHSEN]TBCTL[SWFSYNC](software forced sync)EPWMxSYNCICTR=ZEROCTR_D
Operational Description of HRPWMwww.ti.com2.3 Principle of OperationThe MEP logic is capable of placing an edge in one of 255 (8 bits) discrete time s
Tpwm=800ns324ns30 31 32 33 3410nssteps37.5%38.8%40.0%41.3%42.5%Demandedduty(40.5%)EPWM1A0 79www.ti.comOperational Description of HRPWM2.3.1 Edg
Operational Description of HRPWMwww.ti.comTable 4. CMPA vs Duty (left), and [CMPA:CMPAHR] vs Duty (right)CMPA (count)(1) (2) (3)DUTY High CMPA CMPAHR
www.ti.comOperational Description of HRPWMAssumptions for this example:System clock , SYSCLKOUT = 10 ns (100 MHz)PWM frequency = 1.25 MHz (1/800 ns)Re
T =1000nsPWMEPWM1A0 10060ns30ns(F =1MHz)PWM3 6SYSCLKOUT =TBCLK=100MHzOperational Description of HRPWMwww.ti.comNOTE: The MEP scale factor (MEP
www.ti.comOperational Description of HRPWMTable 5. Duty Cycle Range Limitation for 3 and 6 SYSCLK/TBCLK CyclesPWM Frequency(1)3 Cycles 6 Cycles SYSCLK
Tpwm = 1000 nsEPWM1A010060 ns30 ns(Fpwm = 1 MHz)3 6SYSCLKOUT = 100 MHzOperational Description of HRPWMwww.ti.comFigure 7. High % Duty Cycle Range Limi
www.ti.comOperational Description of HRPWMTable 6. SFO Library Routines (continued)Function DescriptionMEP steps per TBCLK = MEP_ScaleFactor[n] * (100
2SPRU924F– April 2005– Revised October 2011Submit Documentation FeedbackCopyright © 2005–2011, Texas Instruments Incorporated
Operational Description of HRPWMwww.ti.comWhile using HRPWM feature with no SFO diagnostics, HRPWM logic will not be active for the first 3TBCLK cycle
www.ti.comOperational Description of HRPWMTable 7. Factor ValuesSoftware function calls Functional description Updated VariableMEP_ScaleFactor[5](1)SF
Operational Description of HRPWMwww.ti.comExample 3. Initializing With a Scale Factor Value (continued)while (MEP_ScaleFactor[3] == 0) SFO_MepDis(3);
www.ti.comOperational Description of HRPWMExample 4. SFO Function Callsmain(){// User code// Case1: ePWM1,2,3,4 are running in HRPWM modeSFO_MepEn(1);
EPWM1AVin1Vout1BuckZ CA Z CA ZTpwrrEPWM1AOperational Description of HRPWMwww.ti.comExample 5. #Defines for HRPWM Header Files//-----------------------
www.ti.comOperational Description of HRPWMThe example code shown consists of two main parts:• Initialization code (executed once)• Run time code (typi
EPWM1AVOUT1LPFEPWM1ACATPWM= 2.5 µsZCAZZOperational Description of HRPWMwww.ti.comExample 7. HRPWM Buck Converter Run-Time Code (continued)MPYU ACC,T,@
www.ti.comOperational Description of HRPWMExample 8. PWM DAC Function Initialization Codevoid HrPwmDacDrvCnf(void) {// Config for conventional PWM fir
Operational Description of HRPWMwww.ti.comExample 9. PWM DAC Function Run-Time CodeEPWM1_BASE .set 0x6800CMPAHR1 .set EPWM1_BASE+0x8;=================
www.ti.comHRPWM Register Descriptions3 HRPWM Register DescriptionsThis section describes the applicable HRPWM registers3.1 Register SummaryA summary o
ContentsPreface ...
HRPWM Register Descriptionswww.ti.com3.2 Registers and Field DescriptionsFigure 12. HRPWM Configuration Register (HRCNFG)15 8ReservedR-07 4 3 2 1 0Res
www.ti.comHRPWM Register DescriptionsTable 11. TB Phase High Resolution Register (TBPHSHR) Field DescriptionsBit Field Value Description15-8 TBPHSH Ti
32High-Resolution Pulse Width Modulator (HRPWM) SPRU924F– April 2005– Revised October 2011Submit Documentation FeedbackCopyright © 2005–2011, Texas In
www.ti.comAppendix AAppendix A SFO Library Software - SFO_TI_Build_V5.libThis appendix includes a detailed description of the software routines in SFO
SFO Library Version Comparisonwww.ti.comTable 13. SFO V5 Library RoutinesFunction Descriptionint SFO_MepDis_V5(n) Scale Factor Optimizer V5 with MEP D
www.ti.comSFO Library Version ComparisonTable 13. SFO V5 Library Routines (continued)Function DescriptionConstraints when using this function:• This r
Software Usagewww.ti.comTable 13. SFO V5 Library Routines (continued)Function DescriptionIf it returns a 2, the MEP_ScaleFactor for the channel has fi
www.ti.comSoftware UsageStep 1. Add "Include" FilesThe SFO_V5.h file needs to be included as follows. This include file is mandatory when us
Software Usagewww.ti.com&EPwm8Regs, &EPwm9Regs, &EPwm10Regs, &EPwm11Regs, &EPwm12Regs, &EPwm13Regs, &EPwm14Regs, &EPwm
www.ti.comSoftware UsageStep 4. MEP_ScaleFactorAfter power up, the SFO_MepEn_V5(n) function needs a typical scale factor starting seed value inMEP_Sca
www.ti.comList of Figures1 Resolution Calculations for Conventionally Generated PWM... 72 Operat
Software Usagewww.ti.comfor(i=1; i<(PWM_CH-1); i++) //update scale factors for ePWM 1-15{MEP_ScaleFactor[i] = MEP_ScaleFactor[16];}NOTE: See the hr
www.ti.comAppendix B Revision HistoryThis document was revised and lists only revisions made in this most recent version. The scope of therevisions wa
IMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improveme
PrefaceSPRU924F– April 2005– Revised October 2011Read This FirstAbout This ManualThis document describes the operation of the high-resolution extensio
Related Documentation From Texas Instrumentswww.ti.comSPRU566 — TMS320x28xx, 28xxx DSP Peripheral Reference Guide describes the peripheralreference gu
PWMtTPWMTSYSCLKPWMresolution(%)=F /F x100%PWM SYSCLKOUTPWMresolution(bits)=Log (T /T )2 PWM SYSCLKOUTReference GuideSPRU924F– April 2005– Rev
Introductionwww.ti.comTable 1. Resolution for PWM and HRPWM (continued)PWM Freq Regular Resolution (PWM) High Resolution (HRPWM)(kHz)Bits % Bits %150
For MEP range and rounding adjustment (0x0180 in Q8 format)[+1.5]www.ti.comOperational Description of HRPWM2 Operational Description of HRPWMThe HRPWM
Comments to this Manuals