Datasheet
TBCTR[15:0]
Time
Base
(TB)
Module
16
CMPA[15:0]
16
16
16
CMPA
CompareAActiveReg.
CTR=CMPA
CTR=CMPB
Action
Qualifier
Module
Digital
comparatorB
CMPB[15:0]
TBCTR[15:0]
CTR=PRD
CTR=0
CMPCTL[LOADAMODE]
Shadow
load
CTR=PRD
CTR=0
CMPCTL[LOADBMODE]
CMPCTL[SHDWBFULL]
CMPCTL[SHDWBMODE]
CMPCTL
[SHDWAFULL]
CMPCTL
[SHDWAMODE]
CMPA
CompareAShadowReg.
Digital
comparatorA
CMPB
CompareBActiveReg.
CMPB
CompareBShadowReg.
Shadow
load
(AQ)
ePWM Submodules
www.ti.com
Figure 34-12. Detailed View of the Counter-Compare Submodule
34.2.3.1 Purpose of the Counter-Compare Submodule
The counter-compare submodule takes as input the time-base counter value. This value is continuously
compared to the counter-compare A (CMPA) and counter-compare B (CMPB) registers. When the time-
base counter is equal to one of the compare registers, the counter-compare unit generates an appropriate
event.
The counter-compare:
• Generates events based on programmable time stamps using the CMPA and CMPB registers
– CTR = CMPA: Time-base counter equals counter-compare A register (TBCTR = CMPA).
– CTR = CMPB: Time-base counter equals counter-compare B register (TBCTR = CMPB)
• Controls the PWM duty cycle if the action-qualifier submodule is configured appropriately
• Shadows new compare values to prevent corruption or glitches during the active PWM cycle
34.2.3.2 Controlling and Monitoring the Counter-Compare Submodule
The counter-compare submodule operation is controlled and monitored by the registers listed in Table 34-
5.
The key signals associated with the counter-compare submodule are described in Table 34-6.
Table 34-5. Counter-Compare Submodule Registers
Register Name Address Offset Shadowed Description
CMPCTL 0Eh No Counter-Compare Control Register.
CMPA 12h Yes Counter-Compare A Register
CMPB 14h Yes Counter-Compare B Register
1728
Enhanced Pulse Width Modulator (ePWM) Module SPNU562–May 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated