The ePWM module represents one
complete PWM channel composed of two PWM outputs: EPWMxA and EPWMxB. Multiple ePWM
modules are instanced within a device as shown in
Figure 30-1. Each ePWM
instance is identical with one exception. Some instances include a hardware
extension that allows more precise control of the PWM outputs. This extension is the
high-resolution pulse width modulator (HRPWM) and is described in Section 30.18. See the device data sheet to determine which ePWM instances include this
feature. Each ePWM module is indicated by a numerical value starting with 1. For
example, ePWM1 is the first instance and ePWM3 is the third instance in the system
and ePWMx indicates any instance.
The ePWM modules are chained together
by way of a clock synchronization scheme that allows them to operate as a single
system when required. Additionally, this synchronization scheme can be extended to
the capture peripheral submodules (eCAP). The number of submodules is
device-dependent and based on target application needs. Submodules can also operate
standalone.
Each ePWM module supports the
following features:
- Dedicated 16-bit time-base counter with period and
frequency control
- Two PWM outputs (EPWMxA and EPWMxB) that can be used in the
following configurations:
- Two independent PWM
outputs with single-edge operation
- Two independent PWM
outputs with dual-edge symmetric operation
- One independent PWM
output with dual-edge asymmetric operation
- Asynchronous override control of PWM signals through
software.
- Programmable phase-control support for lag or lead
operation relative to other ePWM modules.
- Hardware-locked (synchronized) phase relationship on a
cycle-by-cycle basis.
- Dead-band generation with independent rising and falling
edge delay control.
- Programmable trip zone allocation of both cycle-by-cycle
trip and one-shot trip on fault conditions.
- A trip condition can force either high, low, or
high-impedance state logic levels at PWM outputs.
- All events can trigger both CPU interrupts and ADC start of
conversion (SOC)
- Programmable event prescaling minimizes CPU overhead on
interrupts.
- PWM chopping by high-frequency carrier signal, useful for
pulse transformer gate drives.
Each ePWM module is connected to the
input/output signals shown in Figure 30-1. The signals are described in
detail in subsequent sections.
The order in which the ePWM modules are connected can differ from what is shown in
Figure 30-1. See Section 30.4.3.3 for the synchronization scheme for a particular device. Each ePWM module consists
of eight submodules
and is connected within a system by way of the signals shown in Figure 30-2.
Figure 30-3 shows more internal details of a single ePWM module. The main signals used by the
ePWM module are:
- PWM output signals (EPWMxA and
EPWMxB): The PWM output signals are made available external to the
device.
- Trip-zone signals
(TZ1 to TZ6): These input
signals alert the ePWM module of fault conditions external to the ePWM module.
Each submodule on a device can be configured to either use or ignore any of the
trip-zone signals. The
TZ1 to TZ3 trip-zone signals
can be configured as asynchronous inputs through the GPIO peripheral using
the Input X-BAR logic, refer to Figure 30-75. TZ4 is connected to an inverted EQEPx error signal
(EQEPxERR), which can be generated from any one of the EQEP submodule (for
those devices with an EQEP module). TZ5 is connected to
the system clock fail logic, and TZ6 is connected to
the EMUSTOP output from the CPU. This allows
configuring a trip action when the clock fails or the CPU halts.
- Time-base synchronization
input (EPWMxSYNCI), output (EPWMxSYNCO), and peripheral (EPWMxSYNCPER)
signals: Each ePWM module can be synchronized with other ePWM modules or other
peripherals, using EPWMSYNCINSEL. Each ePWM module can also generate a
synchronization output signal. The source of the EPWMxSYNCOUT can be
selected and enabled by EPWMSYNCOUTEN and TBCTL2.OSHTSYNCMODE. For more
information, see Section 30.4.3.3.
Each ePWM module also
generates another PWMSYNC signal called EPWMxSYNCPER. EPWMxSYNCPER goes to
the GPDAC and CMPSS for synchronization purposes. Functionality is
configured using the HRPCTL register, but has no relation with the HRPWM.
For more information on how EPWMxSYNCPER is used by the GPDAC and CMPSS, see the respective chapters.
- ADC start-of-conversion
signals (EPWMxSOCA and EPWMxSOCB): Each ePWM module has two ADC start of
conversion signals. Any ePWM module can trigger a start of conversion. Whichever
event triggers the start of conversion is configured in the event-trigger
submodule of the ePWM.
- Comparator output signals
(COMPxOUT): Output signals from the comparator module can be fed through
the Input X-BAR and EPWM X-BAR to one or all of the 15
trip inputs [TRIPIN1-TRIPIN15] and in conjunction with the trip zone
signals can generate digital compare events.
- Peripheral bus: The
peripheral bus is 32-bits wide and allows both 16-bit and 32-bit writes to the
ePWM register file.