Texas Instruments TMS320DM648 Computer Drive User Manual


 
www.ti.com
2.3EDMAOperation
2.3.1CaptureEDMAEventGeneration
EDMAOperation
Displaycompletenotacknowledged(DCNA)bitisset.
GPIOinterrupt(GPIO)bitisset.
Theinterruptsignalisapulseonlyanddoesnotholdstate.Theinterruptpulseisgeneratedonlywhenthe
numberofsetflagsinVPIStransitionsfromnonetooneormore.Anotherinterruptpulseisnotgenerated
bysettingadditionalflagbits.
Interruptscanbemaskedviathevideoportinterruptenableregister(VPIE)usingindividualinterrupt
enablesandtheVIEglobalenablebit.Theinterruptsareclearedinthevideoportinterruptstatusregister
(VPIS)usingtheindividualstatusbits.Writinga1totheappropriatebitclearstheinterrupt.Theclearing
ofaninterruptflagreenablesthegenerationofanotherinterruptpulse,ifotherflagsarestillset.Inother
words,pulsegenerationisreenabledbywritinga1toanysetbitofVPIS.
Uponreceivinganinterruptyoushould:
1.ReadVPIS.
2.Performtheserviceroutineforwhateverbitsareset.
3.Clearappropriatebitsbywritinga1totheirVPISlocations.
4.UponreturnfromtheISR,ifVPISbitshavebeen(orremain)set,thenanotherinterruptwilloccur.
ThevideoportusesuptothreeEDMAeventsperchannelforatotalofsixpossibleevents.EachEDMA
eventusesadedicatedeventoutput.Theoutputsare:
VPYEVTA
VPCbEVTA
VPCrEVTA
VPYEVTB
VPCbEVTB
VPCrEVTB
CaptureEDMAeventsaregeneratedbasedonthestateofthecaptureFIFO(s).IfnoEDMAeventis
currentlypendingandtheFIFOcrossesthevaluespecifiedbyVCTHRLDn,anEDMAeventisgenerated.
Onceaneventhasbeenrequested,anotherEDMAeventmaynotbegenerateduntiltheservicingofthe
outstandingeventhasbegun(asindicatedbythefirstreadoftheFIFObytheEDMAeventservice).Ifthe
captureFIFOlevelexceeds2xtheVCTHRLDnvaluebeforetherequestedEDMAeventcompletes,then
anotherEDMAeventmaybegenerated.Thus,uptooneEDMAeventmaybeoutstanding.
AnoutgoingdatacountercountsdatareadbytheEDMA.ThiscounterisloadedwiththeVCTHRLDn
valuewheneveranewEDMAservicebegins.Thecounterthencountsdownforeachdouble-wordread
fromtheFIFObytheEDMA.TheEDMAiscompletewhenthecounterreacheszero.
ForBT.656andY/Cmodes,therearethreeFIFOs,oneforeachoftheY,Cb,andCrcolorcomponents.
EachFIFOgeneratesitsownEDMAevent;therefore,theEDMAeventstateandFIFOthresholdsforeach
FIFOaretrackedindependently.TheCbandCrFIFOsuseathresholdvalueof1/2(VCTHRLDn+
VCTHRLDnmod2).
BecausethecaptureFIFOsmayholdmultiplethresholdsworthofdata,aproblemarisesatthe
boundariesbetweenfields.SinceField1andField2mayhavedifferentthresholdvalues,theamountof
dataintheFIFOrequiredtogeneratetheEDMAeventchangesdependingonthecurrentcapturefield
andthefieldofanyoutstandingEDMArequests.Similarly,thethresholdvalueloadedintheoutgoingdata
counterneedstochangedependingonwhichfield'sEDMAeventisbeingserviced(notwhichfieldis
currentlybeingcaptured).Topreventconfusionatthefieldboundaries,theVCxEVTCTregisteris
programmedtoindicatethenumberofeventstogenerateforeachfield.Aneventcountertrackshow
manyeventshavebeengeneratedandindicateswhichthresholdvaluetouseineventgenerationandin
theoutgoingdatacounter.AfterthelastField1eventhasbeengenerated,theEDMAlogiclooksforFIFO
>THRSHLD1+THRSHLD2topre-generatethefirstField2event.OncethelastField1eventcompletes,
thelogiclooksforFIFO>2xTHRSHLD2(assumingaField2eventisoutstanding).
VideoPort 32SPRUEM1May2007
SubmitDocumentationFeedback