ePWM Submodules
702
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Enhanced Pulse Width Modulator (ePWM) Module
7.2.9.4
Operation Highlights of the Digital Compare Submodule
The following sections describe the operational highlights and configuration options for the digital compare
submodule.
7.2.9.4.1 Digital Compare Events
As illustrated in
earlier in this section, trip zone inputs (TZ1, TZ2, and TZ3) and COMPxOUT
signals from the analog comparator (COMP) module can be selected via the DCTRIPSEL bits to generate
the Digital Compare A High and Low (DCAH/L) and Digital Compare B High and Low (DCBH/L) signals.
Then, the configuration of the TZDCSEL register qualifies the actions on the selected DCAH/L and
DCBH/L signals, which generate the DCAEVT1/2 and DCBEVT1/2 events (Event Qualification A and B).
NOTE:
The TZn signals, when used as a DCEVT tripping functions, are treated as a normal input
signal and can be defined to be active high or active low inputs. EPWM outputs are
asynchronously tripped when either the TZn, DCAEVTx.force, or DCBEVTx.force signals are
active. For the condition to remain latched, a minimum of 3*TBCLK sync pulse width is
required. If pulse width is < 3*TBCLK sync pulse width, the trip condition may or may not get
latched by CBC or OST latches.
The DCAEVT1/2 and DCBEVT1/2 events can then be filtered to provide a filtered version of the event
signals (DCEVTFILT) or the filtering can be bypassed. Filtering is discussed further in section 2.9.3.2.
Either the DCAEVT1/2 and DCBEVT1/2 event signals or the filtered DCEVTFILT event signals can
generate a force to the trip zone module, a TZ interrupt, an ADC SOC, or a PWM sync signal.
•
force signal:
DCAEVT1/2.force signals force trip zone conditions which either directly influence the output on the
EPWMxA pin (via TZCTL[DCAEVT1 or DCAEVT2] configurations) or, if the DCAEVT1/2 signals are
selected as one-shot or cycle-by-cycle trip sources (via the TZSEL register), the DCAEVT1/2.force
signals can effect the trip action via the TZCTL[TZA] configuration. The DCBEVT1/2.force signals
behaves similarly, but affect the EPWMxB output pin instead of the EPWMxA output pin.
The priority of conflicting actions on the TZCTL register is as follows (highest priority overrides lower
priority):
Output EPWMxA: TZA (highest) -> DCAEVT1 -> DCAEVT2 (lowest)
Output EPWMxB: TZB (highest) -> DCBEVT1 -> DCBEVT2 (lowest)
•
interrupt signal:
DCAEVT1/2.interrupt signals generate trip zone interrupts to the PIE. To enable the interrupt, the user
must set the DCAEVT1, DCAEVT2, DCBEVT1, or DCBEVT2 bits in the TZEINT register. Once one of
these events occurs, an EPWMxTZINT interrupt is triggered, and the corresponding bit in the TZCLR
register must be set in order to clear the interrupt.
•
soc signal:
The DCAEVT1.soc signal interfaces with the event-trigger submodule and can be selected as an event
which generates an ADC start-of-conversion-A (SOCA) pulse via the ETSEL[SOCASEL] bit. Likewise,
the DCBEVT1.soc signal can be selected as an event which generates an ADC start-of-conversion-B
(SOCB) pulse via the ETSEL[SOCBSEL] bit.
•
sync signal:
The DCAEVT1.sync and DCBEVT1.sync events are ORed with the EPWMxSYNCI input signal and the
TBCTL[SWFSYNC] signal to generate a synchronization pulse to the time-base counter.
The diagrams below show how the DCAEVT1, DCAEVT2 or DCEVTFLT signals are processed to
generate the digital compare A event force, interrupt, soc and sync signals.