www.ti.com
Counter-CompareSubmoduleRegisters
Table4-6.Counter-CompareARegister(CMPA)FieldDescriptions
BitsNameDescription
15-0CMPAThevalueintheactiveCMPAregisteriscontinuouslycomparedtothetime-basecounter(TBCTR).When
thevaluesareequal,thecounter-comparemodulegeneratesa"time-basecounterequaltocounter
compareA"event.Thiseventissenttotheaction-qualifierwhereitisqualifiedandconverteditintoone
ormoreactions.TheseactionscanbeappliedtoeithertheEPWMxAortheEPWMxBoutputdepending
ontheconfigurationoftheAQCTLAandAQCTLBregisters.Theactionsthatcanbedefinedinthe
AQCTLAandAQCTLBregistersinclude:
•Donothing;theeventisignored.
•Clear:PulltheEPWMxAand/orEPWMxBsignallow
•Set:PulltheEPWMxAand/orEPWMxBsignalhigh
•ToggletheEPWMxAand/orEPWMxBsignal
ShadowingofthisregisterisenabledanddisabledbytheCMPCTL[SHDWAMODE]bit.Bydefaultthis
registerisshadowed.
•IfCMPCTL[SHDWAMODE]=0,thentheshadowisenabledandanywriteorreadwillautomatically
gototheshadowregister.Inthiscase,theCMPCTL[LOADAMODE]bitfielddetermineswhichevent
willloadtheactiveregisterfromtheshadowregister.
•Beforeawrite,theCMPCTL[SHDWAFULL]bitcanbereadtodetermineiftheshadowregisteris
currentlyfull.
•IfCMPCTL[SHDWAMODE]=1,thentheshadowregisterisdisabledandanywriteorreadwillgo
directlytotheactiveregister,thatistheregisteractivelycontrollingthehardware.
•Ineithermode,theactiveandshadowregisterssharethesamememorymapaddress.
Figure4-7.Counter-CompareBRegister(CMPB)
150
CMPB
R/W-0
LEGEND:R/W=Read/Write;R=Readonly;-n=valueafterreset
Table4-7.Counter-CompareBRegister(CMPB)FieldDescriptions
BitsNameDescription
15-0CMPBThevalueintheactiveCMPBregisteriscontinuouslycomparedtothetime-basecounter(TBCTR).When
thevaluesareequal,thecounter-comparemodulegeneratesa"time-basecounterequaltocounter
compareB"event.Thiseventissenttotheaction-qualifierwhereitisqualifiedandconverteditintoone
ormoreactions.TheseactionscanbeappliedtoeithertheEPWMxAortheEPWMxBoutputdepending
ontheconfigurationoftheAQCTLAandAQCTLBregisters.Theactionsthatcanbedefinedinthe
AQCTLAandAQCTLBregistersinclude:
•Donothing.eventisignored.
•Clear:PulltheEPWMxAand/orEPWMxBsignallow
•Set:PulltheEPWMxAand/orEPWMxBsignalhigh
•ToggletheEPWMxAand/orEPWMxBsignal
ShadowingofthisregisterisenabledanddisabledbytheCMPCTL[SHDWBMODE]bit.Bydefaultthis
registerisshadowed.
•IfCMPCTL[SHDWBMODE]=0,thentheshadowisenabledandanywriteorreadwillautomatically
gototheshadowregister.Inthiscase,theCMPCTL[LOADBMODE]bitfielddetermineswhichevent
willloadtheactiveregisterfromtheshadowregister:
•Beforeawrite,theCMPCTL[SHDWBFULL]bitcanbereadtodetermineiftheshadowregisteris
currentlyfull.
•IfCMPCTL[SHDWBMODE]=1,thentheshadowregisterisdisabledandanywriteorreadwillgo
directlytotheactiveregister,thatistheregisteractivelycontrollingthehardware.
•Ineithermode,theactiveandshadowregisterssharethesamememorymapaddress.
Registers98SPRU791D–November2004–RevisedOctober2007
SubmitDocumentationFeedback