ePWM Submodules
702
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Enhanced Pulse Width Modulator (ePWM) Module
Table 7-13. Behavior if CMPA/CMPB is Greater than the Period (continued)
Counter Mode
Compare on Up-Count Event
CAD/CBD
Compare on Down-Count Event
CAD/CBD
Down-Count Mode
Never occurs.
If CMPA/CMPB < TBPRD, the event will occur on a
compare match (TBCTR=CMPA or CMPB).
If CMPA/CMPB
≥
TBPRD, the event will occur on a
period match (TBCTR=TBPRD).
Up-Down-Count
Mode
If CMPA/CMPB < TBPRD and the counter is
incrementing, the event occurs on a compare match
(TBCTR=CMPA or CMPB).
If CMPA/CMPB < TBPRD and the counter is
decrementing, the event occurs on a compare match
(TBCTR=CMPA or CMPB).
If CMPA/CMPB is
≥
TBPRD, the event will occur on a
period match (TBCTR = TBPRD).
If CMPA/CMPB
≥
TBPRD, the event occurs on a
period match (TBCTR=TBPRD).
7.2.4.4
AQCTLA and AQCTLB shadow mode operations
To enable Action Qualifier mode changes which must occur at the end of a period even when the phase
changes, shadowing of the AQCTLA and AQCTLB registers has been added on ePWM type 2.
Additionally, shadow to active load on SYNC of these registers is supported as well. Shadowing of this
register is enabled and disabled by the AQCTLR[SHDWAQAMODE] and AQCTLR[SHDWAQBMODE]
bits. These bits enable and disable the AQCTLA shadow register and AQCTLB shadow register,
respectively. The behavior of the two load modes is described below:
Shadow Mode:
The shadow mode for the AQCTLA is enabled by setting the AQCTLR[SHDWAQAMODE] bit, and the
shadow register for AQCTLB is enabled by setting the AQCTLR[SHDWAQBMODE] bit. Shadow mode is
disabled by default for both AQCTLA and AQCTLB
If the shadow register is enabled, then the content of the shadow register is transferred to the active
register on one of the following events as specified by the AQCTLR[LDAQAMODE]
AQCTLR[LDAQBMODE] AQCTLR[LDAQASYNC] & AQCTLR[LDAQBSYNC] register bits:
•
CTR = PRD: Time-base counter equal to the period (TBCTR = TBPRD).
•
CTR = Zero: Time-base counter equal to zero (TBCTR = 0x00)
•
Both CTR = PRD and CTR = Zero
•
SYNC event caused by DCAEVT1 or DCBEVT1 or EPWMxSYNCI or TBCTL[SWFSYNC]
•
Both SYNC event or a selection made by LDAQAMODE/LDAQBMODE
Immediate Load Mode:
If immediate load mode is selected (i.e., AQCTLR[SHDWAQAMODE] = 0 or AQCTLR[SHDWAQBMODE]
= 0), then a read from or a write to the register will go directly to the active register. See
and
NOTE:
Shadow to Active Load of Action Qualifier Output A/B Control Register [AQCTLA &
AQCTLB] on CMPA = 0 or CMPB = 0 boundary
If the Counter-Compare A Register (CMPA) or Counter-Compare B Register (CMPB) is set
to a value of 0 and the action qualifier action on AQCTLA and AQCTLB is configured to
occur in the same instant as a shadow to active load (i.e., CMPA=0 and AQCTLA shadow to
active load on TBCTR=0 using AQCTLR register LDAQAMODE and LDAQAMODE bits),
then both events enter contention and it is recommended to use a Non-Zero Counter-
Compare when using Shadow to Active Load of Action Qualifier Output A/B Control Register
on TBCTR = 0 boundary.