ePWM
TMS320F2837xD Microcontroller Workshop - Control Peripherals 7 - 11
ePWM Compare Sub-Module
ePWM Compare Sub-Module
16-Bit
Time-Base
Counter
Compare
Logic
Action
Qualifier
Dead
Band
PWM
Chopper
Trip
Zone
Period
Register
Clock
Prescaler
EPWMxA
EPWMxB
TZy
EPWMxSYNCI EPWMxSYNCO
TBCLK
Digital
Compare
Compare
Registers
Event Trigger
Compare
Registers
INPUT X-Bar
ePWM X-Bar
TZ1-TZ3
EPWMCLK
The counter-compare submodule continuously compares the time-base count value to four
counter compare registers (CMPA, CMPB, CMPC, and CMPD) and generates four independent
compare events (i.e. time-base counter equals a compare register value) which are fed to the
action-qualifier and event-trigger submodules. The counter compare registers are shadowed to
prevent corruption or glitches during the active PWM cycle. Typically CMPA and CMPB are used
to control the duty cycle of the generated PWM waveform, and all four compare registers can be
used to start an ADC conversion or generate an ePWM interrupt. For the up-count and down-
count modes, a counter match occurs only once per cycle, however for the up-down-count mode
a counter match occurs twice per cycle since there is a match on the up count and down count.