Architecture
www.ti.com
302
SPRUH91D–March 2013–Revised September 2016
Submit Documentation Feedback
Copyright © 2013–2016, Texas Instruments Incorporated
Enhanced High-Resolution Pulse-Width Modulator (eHRPWM)
14.2.4.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 submodule:
• Generates events based on programmable time stamps using the CMPA and CMPB registers
– CTR = CMPA: Time-base counter equals counter-compare A register (TBCNT = CMPA).
– CTR = CMPB: Time-base counter equals counter-compare B register (TBCNT = 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
14.2.4.2 Controlling and Monitoring the Counter-Compare Submodule
Table 14-5 lists the registers used to control and monitor the counter-compare submodule. Table 14-6 lists
the key signals associated with the counter-compare submodule.
(1)
This register is available only on ePWM modules with the high-resolution extension (HRPWM). On ePWM modules that do not
include the HRPWM, this location is reserved. Refer to the device-specific data manual to determine which ePWM instances
include this feature.
Table 14-5. Counter-Compare Submodule Registers
Acronym Register Description Address Offset Shadowed
CMPCTL Counter-Compare Control Register. Eh No
CMPAHR HRPWM Counter-Compare A Extension Register
(1)
10h Yes
CMPA Counter-Compare A Register 12h Yes
CMPB Counter-Compare B Register 14h Yes
Table 14-6. Counter-Compare Submodule Key Signals
Signal Description of Event Registers Compared
CTR = CMPA Time-base counter equal to the active counter-compare A value TBCNT = CMPA
CTR = CMPB Time-base counter equal to the active counter-compare B value TBCNT = CMPB
CTR = PRD Time-base counter equal to the active period.
Used to load active counter-compare A and B registers from the shadow register
TBCNT = TBPRD
CTR = 0 Time-base counter equal to zero.
Used to load active counter-compare A and B registers from the shadow register
TBCNT = 0000h