www.ti.com
Counter-Compare (CC) Submodule
2.3.1 Purpose of the Counter-Compare Submodule
The
The
∙Generates events based on programmable time stamps using the CMPA and CMPB registers
–CTR = CMPA:
–CTR = CMPB:
∙Controls the PWM duty cycle if the
∙Shadows new compare values to prevent corruption or glitches during the active PWM cycle
2.3.2Controlling and Monitoring the Counter-Compare Submodule
The
Table 2-4. Counter-Compare Submodule Registers
Register Name | Address Offset | Shadowed | Description |
CMPCTL | 0x0007 | No | |
CMPAHR | 0x0008 | Yes | HRPWM |
CMPA | 0x0009 | Yes | |
CMPB | 0x000A | Yes |
(1)This register is available only on ePWM modules with the
Figure 2-12. Detailed View of the Counter-Compare Submodule
| Time | TBCTR[15:0] | 16 |
| Base |
|
|
| (TB) |
|
|
| Module |
| 16 |
|
| CMPA[15:0] | |
|
|
| |
CTR=PRD | Shadow | CMPA |
|
CTR=0 | load | CompareAActiveReg. | |
| CMPA |
| |
|
|
| |
|
| CompareAShadowReg. | |
CMPCTL[LOADAMODE] | TBCTR[15:0] | 16 | |
|
|
| |
|
| CMPB[15:0] | 16 |
|
|
|
|
|
|
| Shadow |
|
|
| ||
|
|
|
|
|
|
|
|
|
| |||
CTR=PRD |
|
|
|
| CMPB | |||||||
|
|
|
| load | ||||||||
|
|
|
|
|
|
| CompareBActiveReg. | |||||
| CTR=0 |
|
|
|
| |||||||
|
|
|
|
|
|
| CMPB | |||||
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
| CompareBShadowReg. | ||
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
| CTR=CMPA |
| ||||
|
|
|
|
|
| |
Digital |
| |||||
comparatorA |
| |||||
| CMPCTL |
| ||||
[SHDWAFULL] | Action | |||||
|
|
|
|
| ||
| CMPCTL | Qualifier | ||||
| (AQ) | |||||
[SHDWAMODE] | ||||||
Module | ||||||
|
|
|
|
| ||
|
|
|
|
|
CTR=CMPB
Digital comparatorB
CMPCTL[SHDWBFULL]
CMPCTL[SHDWBMODE]
CMPCTL[LOADBMODE]
ePWM Submodules | 33 |