Texas Instruments TMS320x2833x Reference Manual
Texas Instruments TMS320x2833x Reference Manual

Texas Instruments TMS320x2833x Reference Manual

Enhanced pulse width modulator (epwm) module
Table of Contents

Advertisement

Quick Links

TMS320x2833x, 2823x Enhanced Pulse Width
Modulator (ePWM) Module
Reference Guide
Literature Number: SPRUG04A
October 2008 – Revised July 2009

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320x2833x and is the answer not in the manual?

Questions and answers

Summary of Contents for Texas Instruments TMS320x2833x

  • Page 1 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Reference Guide Literature Number: SPRUG04A October 2008 – Revised July 2009...
  • Page 2 SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 3: Table Of Contents

    ............Trip-Zone Submodule Control and Status Registers ................Event-Trigger Submodule Registers ................Proper Interrupt Initialization Procedure ..................... Appendix A Revision History SPRUG04A – October 2008 – Revised July 2009 Table of Contents Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 4 PWM-Chopper Submodule Waveforms Showing the Pulse Width (Duty Cycle) Control of Sustaining ........................Pulses ..................... Trip-Zone Submodule ................Trip-Zone Submodule Mode Control Logic ................... Trip-Zone Submodule Interrupt Logic ....................Event-Trigger Submodule List of Figures SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 5 Event-Trigger Selection Register (ETSEL) ................Event-Trigger Prescale Register (ETPS) ................. Event-Trigger Flag Register (ETFLG) ................Event-Trigger Clear Register (ETCLR) ................Event-Trigger Force Register (ETFRC) SPRUG04A – October 2008 – Revised July 2009 List of Figures Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 6 ............Event-Trigger Prescale Register (ETPS) Field Descriptions ............Event-Trigger Flag Register (ETFLG) Field Descriptions ............Event-Trigger Clear Register (ETCLR) Field Descriptions List of Tables SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 7 ............Event-Trigger Force Register (ETFRC) Field Descriptions ....................Changes for this Revision SPRUG04A – October 2008 – Revised July 2009 List of Tables Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 8: Preface

    — TMS320x28xx, 28xxx DSP Peripheral Reference Guide describes the peripheral reference guides of the 28x digital signal processors (DSPs). SPRUFB0 — TMS320x2833x, 2823x System Control and Interrupts Reference Guide describes the various interrupts and system control features of the 2833x and 2823x digital signal controllers (DSCs).
  • Page 9 SPRU963 — TMS320x2833x, 2823x Boot ROM Reference Guide describes the purpose and features of the bootloader (factory-programmed boot-loading software) and provides examples of code. It also describes other contents of the device on-chip boot ROM and identifies where all of the information is located within that memory.
  • Page 10 — An Easy Way of Creating a C-callable Assembly Function for the TMS320C28x DSP provides instructions and suggestions to configure the C compiler to assist with C-callable assembly routines. TMS320C28x, C28x are trademarks of Texas Instruments. Read This First SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 11: Introduction

    PWM outputs. This extension is the high-resolution pulse width modulator (HRPWM) and is described in the TMS320x2833x, 2823x High-Resolution Pulse Width Modulator (HRPWM) Reference Guide (SPRUG02) . See the device-specific data manual to determine which ePWM instances include this feature.
  • Page 12 Each ePWM module is connected to the input/output signals shown in Figure 1. The signals are described in detail in subsequent sections. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 13: Multiple Epwm Modules

    Each ePWM module consists of seven submodules and is connected within a system via the signals shown in Figure SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 14: Submodules And Signal Connections For An Epwm Module

    • Peripheral Bus The peripheral bus is 32-bits wide and allows both 16-bit and 32-bit writes to the ePWM register file. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 15: Register Mapping

    1. Each register set is duplicated for each instance of the ePWM module. The start address for each ePWM register file instance on a device is specified in the appropriate data manual. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 16: Epwm Module Control And Status Register Set Grouped By Submodule

    These registers are only available on ePWM instances that include the high-resolution PWM extension. Otherwise these locations are reserved. These registers are described in the TMS320x2833x, 2823x High-Resolution Pulse Width Modulator (HRPWM) Reference Guide (SPRUG02) . See the device specific data manual to determine which instances include the HRPWM.
  • Page 17: Epwm Submodules

    • Bypass the PWM-chopper module entirely. In this case the PWM waveform is passed through without modification. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 18 // = = = = = = = = = = = = = = = = = = = = = = = = = = // ZRO, PRD, CAU, CAD, CBU, CBD bits TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 19 // INTPRD, SOCAPRD, SOCBPRD bits #define ET_DISABLE 0x0 #define ET_1ST 0x1 #define ET_2ND 0x2 #define ET_3RD 0x3 SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 20: Time-Base (Tb) Submodule

    Configure the rate of the time-base clock; a prescaled version of the CPU system clock (SYSCLKOUT). This allows the time-base counter to increment/decrement at a slower rate. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 21: Time-Base Submodule Signals And Registers

    Select Counter Active Reg Disable TBPHS TBCTL[SYNCOSEL] Phase Active Reg Clock SYSCLKOUT TBCLK Prescale TBCTL[HSPCLKDIV] TBCTL[CLKDIV] SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 22: Key Time-Base Signals

    When it reaches zero, the time-base counter is reset to the period value and it begins to decrement once again. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 23: Time-Base Frequency And Period

    If immediate load mode is selected (TBCTL[PRDLD] = 1), then a read from or a write to the TBPRD SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 24 280x, 2801x, 2802x, and 2803x devices. Scheme 1 also applies to the 2804x devices when the ePWM pinout is configured for 280x compatible mode (GPAMCFG[EPWMMODE] = 0). TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 25: Time-Base Counter Synchronization Scheme 1

    Figure 7. Time-Base Counter Synchronization Scheme 1 EPWM1SYNCI GPIO ePWM1 EPWM1SYNCO SYNCI eCAP1 EPWM2SYNCI ePWM2 EPWM2SYNCO EPWM3SYNCI ePWM3 EPWM3SYNCO EPWMxSYNCI ePWMx EPWMxSYNCO SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 26: Time-Base Counter Synchronization Scheme 2

    EPWM15SYNCO EPWM11SYNCO EPWM7SYNCO EPWM4SYNCO EPWM16SYNCI EPWM12SYNCI EPWM8SYNCI ePWM16 ePWM12 ePWM8 EPWM16SYNCO EPWM12SYNCO EPWM8SYNCO TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 27: Time-Base Counter Synchronization Scheme 3

    This feature enables the ePWM module to be automatically synchronized to the time base of another SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 28 To illustrate the operation of the first three modes, the following timing diagrams show when events are generated and how the time-base responds to an EPWMxSYNCI signal. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 29: Time-Base Up-Count Mode Waveforms

    TBCTR[15:0] 0xFFFF TBPRD (value) TBPHS (value) 0000 EPWMxSYNCI CTR_dir CTR = zero CTR = PRD CNT_max SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 30: Time-Base Down-Count Mode Waveforms

    (value) TBPHS (value) 0x0000 EPWMxSYNCI CTR_dir DOWN DOWN DOWN CTR = zero CTR = PRD CNT_max TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 31: Counter-Compare (Cc) Submodule

    CTR = 0 TZ1 to TZ6 EPWMxTZINT Figure 15 shows the basic structure of the counter-compare submodule. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 32: Detailed View Of The Counter-Compare Submodule

    Compare B Shadow Reg. CMPCTL[LOADBMODE] The key signals associated with the counter-compare submodule are described in Table TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 33: Counter-Compare Submodule Key Signals

    Down-count mode: used to generate an asymmetrical PWM waveform. • Up-down-count mode: used to generate a symmetrical PWM waveform. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 34 Figure 16 through Figure 19 show when events are generated and how the EPWMxSYNCI signal interacts. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 35: Counter-Compare Event Waveforms In Up-Count Mode

    This can lead to a compare event being skipped. This skipping is considered normal operation and must be taken into account. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 36: Counter-Compare Events In Down-Count Mode

    TBPRD (value) CMPA (value) CMPB (value) TBPHS (value) 0x0000 EPWMxSYNCI CTR = CMPA CTR = CMPB TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 37: Action-Qualifier (Aq) Submodule

    Action-Qualifier (AQ) Submodule Figure 20 shows the action-qualifier (AQ) submodule (see shaded block) in the ePWM system. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 38: Action-Qualifier Submodule

    Action-Qualifier Control Register For Output B (EPWMxB) AQSFRC 0x000D Action-Qualifier Software Force Register AQCSFRC 0x000E Action-Qualifier Continuous Software Force TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 39: Action-Qualifier Submodule Inputs And Outputs

    ADC start of conversion. See the Event-trigger Submodule description in Section 2.8 for details. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 40: Possible Action-Qualifier Actions For Epwmxa And Epwmxb Outputs

    TB Counter equals: Actions force Comp Comp Zero Period Do Nothing Clear Low Set High Toggle TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 41: Action-Qualifier Event Priority For Up-Down-Count Mode

    (TBCTR=CMPA or CMPB). If CMPA/CMPB ≥ TBPRD, the event will occur on a period match (TBCTR=TBPRD). SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 42 TBPRD-1. This means there will always be a pulse of at least one TBCLK cycle in a PWM period which, when very short, tend to be ignored by the system. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 43: Up-Down-Count Mode Symmetrical Waveform

    Up-Down means Count-up-and-down mode, Up means up-count mode and Dwn means down-count mode • Sym = Symmetric, Asym = Asymmetric SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 44: Up, Single Edge Asymmetric Waveform, With Independent Modulation On Epwmxa And Epwmxb-Active High

    EPwm1Regs.CMPA.half.CMPA = Duty1A; // adjust duty for output EPWM1A EPwm1Regs.CMPB = Duty1B; // adjust duty for output EPWM1B TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 45: Up, Single Edge Asymmetric Waveform With Independent Modulation On Epwmxa And Epwmxb-Active Low

    Example 3 contains a code sample showing initialization and run time for the waveforms in Figure SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 46: Up-Count, Pulse Placement Asymmetric Waveform With Independent Modulation On Epwmxa

    Figure 26. Use the code in to define the headers. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 47 // = = = = = = = = = = = = = = = = = = = = = = = = EPwm1Regs.CMPA.half.CMPA = EdgePosA; // adjust duty for output EPWM1A only EPwm1Regs.CMPB = EdgePosB; SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 48: Up-Down-Count, Dual Edge Symmetric Waveform, With Independent Modulation On Epwmxa And Epwmxb - Active Low

    EPwm1Regs.CMPA.half.CMPA = Duty1A; // adjust duty for output EPWM1A EPwm1Regs.CMPB = Duty1B; // adjust duty for output EPWM1B TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 49: Up-Down-Count, Dual Edge Symmetric Waveform, With Independent Modulation On Epwmxa And Epwmxb - Complementary

    EPwm1Regs.CMPA.half.CMPA = Duty1A; // adjust duty for output EPWM1A EPwm1Regs.CMPB = Duty1B; // adjust duty for output EPWM1B SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 50: Up-Down-Count, Dual Edge Asymmetric Waveform, With Independent Modulation On Epwmxa-Active Low

    // = = = = = = = = = = = = = = = = = = = = = = = = EPwm1Regs.CMPA.half.CMPA = EdgePosA; // adjust duty for output EPWM1A only EPwm1Regs.CMPB = EdgePosB; TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 51: Dead-Band Generator (Db) Submodule

    DBRED 0x0010 Dead-Band Rising Edge Delay Count Register DBFED 0x0011 Dead-Band Falling Edge Delay Count Register SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 52: Configuration Options For The Dead-Band Submodule

    32. Note that to generate equivalent waveforms to Figure 32, configure the action-qualifier submodule to generate the signal as shown for EPWMxA. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 53: Dead-Band Waveforms For Typical Cases (0% < Duty < 100%)

    Delayed (FED) Active High Complementary (AHC) Active Low Complementary (ALC) Active High (AH) Active Low (AL) SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 54: Dead-Band Delay Values In Μs As A Function Of Dbfed And Dbred

    16.00 μS 32.00 μS 9.00 μS 18.00 μS 36.00 μS 1000 10.00 μS 20.00 μS 40.00 μS TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 55: Pwm-Chopper (Pc) Submodule

    The one-shot width is programmed via the OSHTWTH bits. The PWM-chopper submodule can be fully disabled (bypassed) via the CHPEN bit. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 56: Pwm-Chopper Submodule Operational Details

    Details of the one-shot and duty-cycle control are discussed in the following sections. Figure 35. Simple PWM-Chopper Submodule Waveforms Showing Chopping Action Only EPWMxA EPWMxB PSCLK EPWMxA EPWMxB TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 57: Pwm-Chopper Submodule Waveforms Showing The First Pulse And Subsequent Sustaining Pulses

    Table 17. Possible Pulse Width Values for SYSCLKOUT = 100 MHz OSHTWTHz Pulse Width (hex) (nS) 1040 1120 1200 1280 SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 58: Pwm-Chopper Submodule Waveforms Showing The Pulse Width (Duty Cycle) Control Of Sustaining Pulses

    PSCLK PSCLK period PSCLK Period 62.5% 87.5% 37.5% 12.5% Duty Duty Duty Duty Duty Duty Duty TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 59: Trip-Zone (Tz) Submodule

    Software-forced tripping is also supported. • The trip-zone submodule can be fully bypassed if it is not required. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 60: Trip-Zone Submodule Registers

    TZCTL[TZA] and TZCTL[TZB] register bits fields. One of four possible actions, shown Table 19, can be taken on a trip event. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 61: Possible Actions On A Trip Event

    Generating Trip Event Interrupts Figure 39 Figure 40 illustrate the trip-zone submodule control and interrupt logic, respectively. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 62: Trip-Zone Submodule Mode Control Logic

    Trip OSHT mode trip event (OSHT) TZFRC[OSHT] Sync Async Trip TZSEL[OSHT1 to OSHT6] TZFLG[OST] Clear TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 63: Event-Trigger (Et) Submodule

    2.8.1 Operational Overview of the Event-Trigger Submodule The following sections describe the event-trigger submodule's operational highlights. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 64: Event-Trigger Submodule Inter-Connectivity Of Adc Start Of Conversion

    Interrupt request or an ADC start of conversion. The event-trigger prescaling logic can issue Interrupt requests and ADC start of conversion at: • Every event TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 65: Event-Trigger Submodule Showing Event Inputs And Prescaled Outputs

    Time-base counter equal to the compare A register (CMPA) when the timer is incrementing. • Time-base counter equal to the compare A register (CMPA) when the timer is decrementing. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 66: Event-Trigger Interrupt Generator

    ETSEL[SOCASEL] and ETSEL[SOCBSEL] bits. The possible events are the same events that can be specified for the interrupt generation logic . TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 67: Event-Trigger Soca Pulse Generator

    SOCB Counter when CTR=Zero input = 1 CTR=PRD Inc CNT CTRU=CMPA ETSEL[SOCBEN] CTRD=CMPA CTRU=CMPB ETPS[SOCBPRD] CTRD=CMPB SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 68: Applications To Power Topologies

    SyncIn strobe input or choose to ignore it, i.e., via the enable switch. Although various combinations are possible, the two most common—master module and slave module modes—are shown in Figure TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 69: Controlling Multiple Buck Converters With Independent Frequencies

    Figure 49; note that only three waveforms are shown, although there are four stages. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 70: Control Of Four Buck Stages. Here F

    EPWM4A CTR=CMPB SyncOut NOTE: Θ = X indicates value in phase register is a "don't care" TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 71: Buck Waveforms For (Note: Only Three Bucks Shown Here)

    EPWM3A Indicates this event triggers an ADC start Indicates this event triggers an interrupt of conversion SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 72 EPwm2Regs.CMPA.half.CMPA = 700; // adjust duty for output EPWM2A EPwm3Regs.CMPA.half.CMPA = 500; // adjust duty for output EPWM3A TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 73: Controlling Multiple Buck Converters With Same Frequencies

    Slave Phase reg EPWM2A SyncIn Φ=X EPWM2A Vin4 Vout4 EPWM2B CTR=zero CTR=CMPB Buck #4 SyncOut EPWM2B SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 74: Pwm2 Pwm1

    Figure 52. Buck Waveforms for Figure 51 (Note: F PWM2 PWM1) EPWM1A EPWM1B EPWM2A EPWM2B TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 75 EPwm2Regs.CMPA.half.CMPA = 500; // adjust duty for output EPWM2A EPwm2Regs.CMPB = 300; // adjust duty for output EPWM2B SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 76: Controlling Multiple Half H-Bridge (Hhb) Converters

    EPWM1B SyncOut Slave Phase reg SyncIn DC_bus Φ=0° EPWM2A out2 EPWM2B CTR=zero EPWM2A CTR=CMPB SyncOut EPWM2B TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 77: Half-H Bridge Waveforms For

    Figure 54. Half-H Bridge Waveforms for Figure 53 (Note: Here F PWM2 PWM1 EPWM1A EPWM1B Pulse Center EPWM2A EPWM2B Pulse Center SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 78: Controlling Dual 3-Phase Inverters For Motors (Aci And Pmsm)

    (module 1) and five slaves. In this case, the frequency of modules 4, 5, and 6 (all equal) can be integer multiples of the frequency for modules 1, 2, 3 (also all equal). TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 79: Control Of Dual 3-Phase Inverter Stages As Is Commonly Used In Motor Control

    3 phase motor SyncOut Slave Phase reg SyncIn 3 phase inverter #2 Φ=0° EPWM6A EPWM6B CTR=zero CTR=CMPB SyncOut SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 80: 56 3-Phase Inverter Waveforms For (Only One Inverter Shown)

    Figure 56. 3-Phase Inverter Waveforms for Figure 55 (Only One Inverter Shown) EPWM1A EPWM1B Φ2=0 EPWM2A EPWM2B Φ3=0 EPWM3A EPWM3B TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 81 EPwm2Regs.CMPA.half.CMPA = 600; // adjust duty for output EPWM2A EPwm3Regs.CMPA.half.CMPA = 700; // adjust duty for output EPWM3A SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 82: Practical Applications Using Phase Control Between Pwm Modules

    SyncIn pulse (CTR = PRD), the value of TBPHS = 200 is loaded into the slave TBCTR register so the slave time-base is always leading the master's time-base by 120°. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 83: Controlling A 3-Phase Interleaved Dc/Dc Converter

    TBPHS(3,3) = 400 (i.e., Phase value for Slave module 3) Figure 60 shows the waveforms for the configuration in Figure SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 84: Control Of A 3-Phase Interleaved Dc/Dc Converter

    Φ=120° EPWM2A EPWM2B CTR=zero CTR=CMPB SyncOut Slave Phase reg SyncIn Φ=240° EPWM3A EPWM3B CTR=zero CTR=CMPB SyncOut TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 85: 60 3-Phase Interleaved Dc/Dc Converter Waveforms For

    Figure 60. 3-Phase Interleaved DC/DC Converter Waveforms for Figure 59 EPWM1A EPWM1B Φ2=120° TBPHS (=300) EPWM2A EPWM2B Φ2=120° TBPHS (=300) EPWM3A EPWM3B SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 86 EPwm2Regs.CMPA.half.CMPA = 285; // adjust duty for output EPWM2A EPwm3Regs.CMPA.half.CMPA = 285; // adjust duty for output EPWM3A TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 87: Controlling Zero Voltage Switched Full Bridge (Zvsfb) Converter

    SyncOut Slave Phase reg SyncIn EPWM2A Φ=Var° EPWM1B EPWM2B EPWM2B CTR=zero CTR=CMPB SyncOut Var = Variable SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 88: Zvs Full-H Bridge Waveforms

    1200 EPWM1A ZVS transition Power phase EPWM1B ZVS transition Φ2=variable TBPHS =(1200−Φ2) EPWM2A EPWM2B Power phase TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 89 EPwm2Regs.DBRED = RED2_NewValue; // Update ZVS transition interval EPwm1Regs.CMPB = 200; // adjust point-in-time for ADCSOC trigger SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 90: Registers

    Writing to these bits sets the current time-base counter value. The update happens as soon as the write occurs; the write is NOT synchronized to the time-base clock (TBCLK) and the register is not shadowed. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 91: Time-Base Control Register (Tbctl)

    This divisor emulates the HSPCLK in the TMS320x281x system as used on the Event Manager (EV) peripheral. /2 (default on reset) SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 92 These bits set the time-base counter mode of operation as follows: Up-count mode Down-count mode Up-down-count mode Stop-freeze counter operation (default on reset) TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 93: Time-Base Status Register (Tbsts)

    To make this bit meaningful, you must first set the appropriate mode via TBCTL[CTRMODE]. Time-Base Counter is currently counting down. Time-Base Counter is currently counting up. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 94: Counter-Compare Submodule Registers

    Figure 69. Counter-Compare B Register (CMPB) CMPB R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 95: Counter-Compare B Register (Cmpb) Field Descriptions

    • In either mode, the active and shadow registers share the same memory map address. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 96: Counter-Compare Control Register (Cmpctl)

    Load on CTR = PRD: Time-base counter equal to period (TBCTR = TBPRD) Load on either CTR = Zero or CTR = PRD Freeze (no loads possible) TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 97: Action-Qualifier Submodule Registers

    Toggle EPWMxA output: low output signal will be forced high, and a high signal will be forced low. SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 98: Action-Qualifier Output B Control Register (Aqctlb)

    Set: force EPWMxB output high. Toggle EPWMxB output: low output signal will be forced high, and a high signal will be forced low. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 99: Action-Qualifier Software Force Register (Aqsfrc)

    This is a one-shot forced event. It can be overridden by another subsequent event on output B. Initiates a single s/w forced event SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 100: Action-Qualifier Continuous Software Force Register (Aqcsfrc)

    Forces a continuous low on output A Forces a continuous high on output A Software forcing is disabled and has no effect 100 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 101: Dead-Band Submodule Registers

    R/W-0 R/W-0 R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 102: Dead-Band Generator Control Register (Dbctl) Field Descriptions

    Dead-band is fully enabled for both rising-edge delay on output EPWMxA and falling-edge delay on output EPWMxB. The input signal for the delay is determined by DBCTL[IN_MODE]. TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback ©...
  • Page 103: Pwm-Chopper Submodule Control Register

    R/W-0 R/W-0 R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 104: Pwm-Chopper Control Register (Pcctl) Bit Descriptions

    16 x SYSCLKOUT / 8 wide ( = 1280 nS at 100 MHz SYSCLKOUT) CHPEN PWM-chopping Enable Disable (bypass) PWM chopping function Enable chopping function TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 105: Trip-Zone Submodule Control And Status Registers

    Disable TZ3 as a CBC trip source for this ePWM module Enable TZ3 as a CBC trip source for this ePWM module SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 106: Trip-Zone Control Register (Tzctl)

    Trip-zone One-Shot Interrupt Enable Disable one-shot interrupt generation Enable Interrupt generation; a one-shot trip event will cause a EPWMx_TZINT PIE interrupt. 106 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 107: Trip-Zone Flag Register (Tzflg)

    R/W-0 R/W-0 R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 108: Event-Trigger Submodule Registers

    INTSEL R/W-0 R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 109: Event-Trigger Prescale Register (Etps)

    INTCNT INTPRD R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 110: Event-Trigger Prescale Register (Etps) Field Descriptions

    No events have occurred. 1 event has occurred. 2 events have occurred. 3 events have occurred. 110 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 111: Event-Trigger Flag Register (Etflg)

    ETFLG[INT] bit is still set. If an interrupt is pending, it will not be generated until after the ETFLG[INT] bit is cleared. Refer to Figure SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 112: Event-Trigger Clear Register (Etclr)

    Writing 0 to this bit will be ignored. Always reads back a 0. Generates an interrupt on EPWMxINT and set the INT flag bit. This bit is used for test purposes. 112 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback...
  • Page 113: Proper Interrupt Initialization Procedure

    6. Clear any spurious ePWM flags (including PIEIFR) 7. Enable ePWM interrupts 8. Enable global interrupts SPRUG04A – October 2008 – Revised July 2009 TMS320x2833x, 2823x Enhanced Pulse Width Modulator (ePWM) Module Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 114: Appendix A Revision History

    Changed all occurrences of DBCTL.bit.MODE to DBCTL.bit.OUT_MODE Section 4.8 Added to the sequence list Figure 90 Changed R-0 for bits 0, 2, 3 to R/W-0 Revision History SPRUG04A – October 2008 – Revised July 2009 Submit Documentation Feedback © 2008–2009, Texas Instruments Incorporated...
  • Page 115 IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.

This manual is also suitable for:

Tms320x2823x

Table of Contents