Texas Instruments TMS320DM648 Computer Drive User Manual


 
www.ti.com
3.10.1HandlingFIFOOverruninBT.656orY/CMode
3.11CapturingVideoinRawDataMode
CapturingVideoinRawDataMode
numberspecifiedbythethresholdfields(VCTHRLDx)inthethresholdregister,aYEVTx,CbEVTx,and
CrEVTxaregeneratedbythevideocapturemodule.
7.ConfigureanEDMAchanneltomovedatafromYSRCxtoadestinationintheDSPmemory.The
channeltransfersshouldbetriggeredbytheYEVTx.Thesizeofthetransfersshouldbeset
appropriatelyduringtheconfigurationoftheEDMAchannelparameters.TheEDMAmuststartona
doublewordboundaryandmoveanevennumberofwords.
8.ConfigureaEDMAchanneltomovedatafromCBSRCxtoadestinationintheDSPmemory.The
channeltransfersshouldbetriggeredbytheCbEVTx.Thesizeofthetransfersshouldbeset
appropriatelyduringtheconfigurationoftheEDMAchannelparameters.TheEDMAmuststartona
doublewordboundaryandmoveanevennumberofwords.
9.ConfigureaEDMAchanneltomovedatafromCRSRCxtoadestinationintheDSPmemory.The
channeltransfersshouldbetriggeredbytheCrEVTx.Thesizeofthetransfersshouldbeset
appropriatelyduringtheconfigurationoftheEDMAchannelparameters.TheEDMAmuststartona
double-wordboundaryandmoveanevennumberofwords.
10.Writetothevideoportinterruptenableregister(VPIE)toenableoverrun(COVRx)andcapture
complete(CCMPx)interrupts,ifdesired.
11.WritetoVCxCTLto:
Setcapturemode(CMODE=0x0forBT.656input,0x4forY/Cinput).
Setdesiredfield/frameoperation(CON,FRAME,CF2,CF1bits).
SetsyncandfieldIDcontrol(VRST,HRST,FDD,FINV,VCTL1bits).
Enablescaling(SCALEandRESMPLbits),ifdesiredandusing8-bitdata.
SetVCENbittoenablecapture.
12.CaptureisenabledatthestartofthefirstframeafterVCEN=1andbeginsatthestartofthefirst
selectedfield.EDMAeventsaregeneratedastriggeredbyVCxTHRLDx.Whenaselectedfieldhas
beencaptured(VCXPOS=VCXSTOPandVCYPOS=VCYSTOP),theF1C,F2C,orFRMCbitsin
VCxSTATaresetandcausetheCCMPxbitinVPIStobeset.ThisgeneratesaDSPinterrupt,ifthe
CCMPxbitisenabledinVPIE.
13.Ifcontinuouscaptureisenabled,thevideoportbeginscapturingagainatthestartofthenextselected
fieldorframe.Ifnoncontinuousfield1andfield2orframecaptureisenabled,thenextfieldorframeis
captured,duringwhichtheDSPmustcleartheappropriatecompletionstatusbitorfurthercaptureis
disabled.Ifsingleframecaptureisenabled,captureisdisableduntiltheDSPclearstheFRMCbit.
IncaseofaFIFOoverrun,theCOVRxbitissetinVPIS.ThisconditioninitiatesaninterrupttotheDSP,if
theoverruninterruptisenabled(settingtheCOVRbitinVPIEenablesoverruninterrupt).
TheoverruninterruptroutineshouldsettheBLKCAPbitinVCxCTLanditshouldreconfigureEDMA
channelsettings.TheEDMAchannelmustbereconfiguredforcaptureofthenextframesincethecurrent
frametransferfailed.SettingtheBLKCAPbitflushesthecaptureFIFOandblocksEDMAeventsforthe
channel.AslongastheBLKCAPbitisset,thevideocapturechannelignorestheincomingdatawith
exceptionofSAVandEAVcodesbuttheinternalcounterscontinuecounting.
TheBLKCAPbitshouldbeclearedto0inordertocontinuecapture.ClearingtheBLKCAPbittakeseffect
inthesubsequentvideofield(EDMAeventsarestillgoingtobeblockedinthevideofieldinwhichthe
BLKCAPbitiscleared.)
Inordertocapturevideointherawdatamode,thefollowingstepsareneeded:
1.TousethedesiredVideoPort,programthePinMuxRegister(PINMUX)appropriatelytoensurethat
themultiplexedpinsworkasVideoPortPins.Refertothedevice-specificdatamanualfordetailsabout
PINMUXregister.
2.ProgramtheVPx_CTLRegisterappropriatelytousethedesiredVideoPortasaCapturePort.
3.SetthePERENbitinthevideoportperipheralcontrolregister(PCR).
4.SetVCxSTOP1tospecifysizeofanimagetobecaptured(VCXSTOPsetsthelower12bitsand
VCYSTOPsetstheupper12bitsofthecapturedimagesizeinbytes).
68VideoCapturePortSPRUEM1May2007
SubmitDocumentationFeedback