ePWM
7 - 12 C2000 Microcontroller Workshop - Control Peripherals
The ePWM Compare Event Waveforms figures shows the compare matches that are fed into the
action qualifier. Notice that with the count up and countdown mode, there are matches on the up-
count and down-count.
ePWM Compare Sub-Module Registers
(lab file: EPwm.c)
Name Description Structure
CMPCTL Compare Control EPwmxRegs.CMPCTL.all =
CMPA Compare A EPwmxRegs.CMPA =
CMPB Compare B EPwmxRegs.CMPB =
ePWM Compare Control Register
EPwmxRegs.CMPCTL
6 5 4 1 - 0
LOADBMODE LOADAMODE
reserved
3 - 2
SHDWBMODE SHDWAMODE
CMPA and CMPB Operating Mode
0 = shadow mode;
double buffer w/ shadow register
1 = immediate mode;
shadow register not used
CMPA and CMPB Shadow Load Mode
00 = load on CTR = 0
01 = load on CTR = PRD
10 = load on CTR = 0 or PRD
11 = freeze (no load possible)
SHDWBFULL
15 - 10 9 8
SHDWAFULL
7
reservedreserved
CMPA and CMPB Shadow Full Flag
(bit automatically clears on load)
0 = shadow not full
1 = shadow full