Transcription of TMS320x2802x, 2803x Piccolo Enhanced Capture Module …
1 TMS320F2802x,2803xPiccoloEnhancedCapture (eCAP)ModuleReferenceGuideLiteratureNumb er:SPRUFZ8 AMay2009 RevisedOctober20092 SPRUFZ8A May2009 RevisedOctober2009 SubmitDocumentationFeedbackCopyright 2009, - - - TimeDifference(Delta) - TimeDifference(Delta) - SimplePWMG eneration(IndependentChannel/s).. May2009 RevisedOctober2009 TableofContentsSubmitDocumentationFeedba ckCopyright 2009, (TSCTR)..1610 CounterPhaseControlRegister(CTRPHS)..161 1 Capture -1 Register(CAP1)..1612 Capture -2 Register(CAP2)..1613 Capture -3 Register(CAP3)..1714 Capture -4 Register(CAP4).
2 1715 ECAPC ontrolRegister1 (ECCTL1)..1716 ECAPC ontrolRegister2 (ECCTL2)..1817 ECAPI nterruptEnableRegister(ECEINT)..2118 ECAPI nterruptFlagRegister(ECFLG)..2219 ECAPI nterruptClearRegister(ECCLR)..2220 ECAPI nterruptForcingRegister(ECFRC).. May2009 RevisedOctober2009 SubmitDocumentationFeedbackCopyright 2009, (TSCTR) (CTRPHS) (CAP1) (CAP2) (CAP3) (CAP4) (ECCTL1) (ECCTL2) (ECEINT) (ECFLG) (ECCLR) (ECFRC) May2009 RevisedOctober2009 ListofTablesSubmitDocumentationFeedbackC opyright 2009,TexasInstrumentsIncorporatedPreface SPRUFZ8A May2009 RevisedOctober2009 ReadThisFirstTheenhancedcapture(eCAP) ,2803xPiccolo EnhancedCapture(eCAP) Type0 ,28xxxDSPP eripheralReferenceGuide(SPRU566)
3 Fora listofalldeviceswitha eCAPmoduleofthesametype,todeterminethedi fferencesbetweenthetypes,andfora ,2803xPiccolo devicesandrelatedsupporttoolsandcanbedow nloadedfromtheTIwebsite( ):DataManuals SPRS523 TMS320F28020,TMS320F28021,TMS320F28022,T MS320F28023,TMS320F28026,TMS320F28027 PiccoloMicrocontrollersDataManualcontain sthepinout,signaldescriptions, TMS320F28020,TMS320F28021,TMS320F28022,T MS320F28023,TMS320F28026, TMS320F28032,TMS320F28033,TMS320F28034,T MS320F28035 PiccoloMicrocontrollersDataManualcontain sthepinout,signaldescriptions, TMS320F28032,TMS320F28033,TMS320F28034, 'sGuides SPRU430 TMS320C28xCPUandInstructionSetReferenceG uidedescribesthecentralprocessingunit(CP U)
4 AndtheassemblylanguageinstructionsoftheT MS320C28xfixed-pointdigitalsignalprocess ors(DSPs).It SPRUFN3 TMS320x2802xPiccoloSystemControlandInter ruptsReferenceGuidedescribesthevariousin terruptsandsystemcontrolfeaturesofthe280 2xmicrocontrollers(MCUs).SPRUGL8 TMS320x2803xPiccoloSystemControlandInter ruptsReferenceGuidedescribesthevariousin terruptsandsystemcontrolfeaturesofthe280 3xmicrocontrollers(MCUs).SPRU566 TMS320x28xx,28xxxDSPP eripheralReferenceGuidedescribestheperip heralreferenceguidesofthe28xdigitalsigna lprocessors(DSPs).SPRUGO0 TMS320x2803xPiccoloBootROMR eferenceGuidedescribesthepurposeandfeatu resofthebootloader(factory-programmedboo t-loadingsoftware) May2009 RevisedOctober2009 SubmitDocumentationFeedbackCopyright 2009, TMS320x2802xPiccoloBootROMR eferenceGuidedescribesthepurposeandfeatu resofthebootloader(factory-programmedboo t-loadingsoftware) TMS320x2803xPiccoloControlLawAccelerator (CLA)ReferenceGuidedescribestheoperation oftheControlLawAccelerator(CLA).
5 SPRUGE2 TMS320x2803xPiccoloLocalInterconnectNetw ork(LIN)ModuleReferenceGuidedescribesthe operationoftheLocalInterconnectNetwork(L IN) TMS320x2803xPiccoloEnhancedQuadratureEnc oderPulse(eQEP)ReferenceGuidedescribesth eoperationoftheEnhancedQuadratureEncoder Pulse(eQEP) Module ,whichis usedforinterfacingwitha linearorrotaryincrementalencodertogetpos ition,direction,andspeedinformationfroma rotatingmachinein TMS320x2803xPiccoloEnhancedControllerAre aNetwork(eCAN)ReferenceGuidedescribesthe operationoftheEnhancedControllerAreaNetw ork(eCAN)whichusesestablishedprotocoltoc ommunicateseriallywithothercontrollersin TMS320x2802x, 2803xPiccoloAnalog-to-Digit alConverter(ADC)andComparatorReferenceGu idedescribeshowtoconfigureandusetheon-ch ipADCmodule,whichis a TMS320x2802x, 2803xPiccoloEnhancedPulseWi dthModulator(ePWM)ModuleReferenceGuidede scribesthemainareasoftheenhancedpulsewid thmodulatorthatincludedigitalmotorcontro l,switchmodepowersupplycontrol,UPS(unint erruptiblepowersupplies), TMS320x2802x, 2803xPiccoloHigh-Resolution PulseWidthModulator(HRPWM)
6 Describestheoperationofthehigh-resolutio nextensiontothepulsewidthmodulator(HRPWM ).SPRUGH1 TMS320x2802x, 2803xPiccoloSerialCommunica tionsInterface(SCI) TMS320x2802x, 2803xPiccoloEnhancedCapture (eCAP) TMS320x2802x, 2803xPiccoloSerialPeriphera lInterface(SPI)ReferenceGuidedescribesth eSPI- a high-speedsynchronousserialinput/output( I/O)port- thatallowsa serialbitstreamofprogrammedlength(onetos ixteenbits) TMS320x2802x, 2803xPiccoloInter-Integrate dCircuit(I2C)ReferenceGuidedescribesthef eaturesandoperationoftheinter-integrated circuit(I2C) SPRU513 'sGuidedescribestheassemblylanguagetools (assemblerandothertoolsusedtodevelopasse mblylanguagecode)
7 ,assemblerdirectives,macros,commonobject fileformat, TMS320C28xOptimizingC/C++ 'sGuidedescribestheTMS320C28x C/C++ ++ TMS320C28xInstructionSetSimulatorTechnic alOverviewdescribesthesimulator,availabl ewithintheCodeComposerStudioforTMS320C20 00 IDE,thatsimulatestheinstructionsetoftheC 28x ,TMS320C28x, May2009 RevisedOctober2009 ReadThisFirstSubmitDocumentationFeedback Copyright 2009,TexasInstrumentsIncorporatedReferen ceGuideSPRUFZ8A May2009 RevisedOctober2009 EnhancedCapture(eCAP)ModuleTheenhancedCa pture(eCAP)moduleis essentialin applicablefortheeCAPfoundontheTMS320x280 2x,2803xPiccolo ,ROM-based, : Speedmeasurementsofrotatingmachinery( ,toothedsprocketssensedviaHallsensors) Elapsedtimemeasurementsbetweenpositionse nsorpulses Periodanddutycyclemeasurementsofpulsetra insignals Decodingcurrentorvoltageamplitudederived fromdutycycleencodedcurrent/voltagesenso rsTheeCAPmoduledescribedin thisguideincludesthefollowingfeatures.
8 4-eventtime-stampregisters(each32bits) Edgepolarityselectionforuptofoursequence dtime-stampcaptureevents Interruptoneitherofthefourevents Singleshotcaptureofuptofoureventtime-sta mps Continuousmodecaptureoftime-stampsin a four-deepcircularbuffer Absolutetime-stampcapture Difference(Delta)modetime-stampcapture Allaboveresourcesdedicatedtoa singleinputpin Whennotusedin capturemode,theECAP modulecanbeconfiguredasa ,oneeCAPchannelhasthefollowingindependen tkeyresources: Dedicatedinputcapturepin 32-bittimebase(counter) 4 x 32-bittime-stampcaptureregisters(CAP1-CA P4) 4-stagesequencer(Modulo4counter)thatissy nchronizedtoexternalevents,ECAP pinrising/fallingedges.
9 Independentedgepolarity(rising/fallinged ge)selectionforall4 events Inputcapturesignalprescaling(from2-62) One-shotcompareregister(2bits)tofreezeca pturesafter1 to4 time-stampevents Controlforcontinuoustime-stampcapturesus inga 4-deepcircularbuffer(CAP1-CAP4)scheme Interruptcapabilitiesonanyofthe4 captureevents8 EnhancedCapture(eCAP)ModuleSPRUFZ8A May2009 RevisedOctober2009 SubmitDocumentationFeedbackCopyright 2009,TexasInstrumentsIncorporatedCounter ( timer )SyncIn32 CAP1 regCAP2 regCAP4 regCAP3 regInterrupt I/FECAPxINTS equencingEdge detectionEdge polarityPrescaleECAP xpinNote.
10 Same pindepends onoperatingmodeCounter ( timer )SyncIn32 CapturemodeAPWM modePeriod reg(active) ( CAP1 )Compare reg(active) ( CAP2 )Period reg(shadow) ( CAP3 )(shadow) ( CAP4 )Compare regInterrupt I/FECAPxINTPWMC ompare single-channelPWMgenerator(with32bitcapa bilities)whenit is count-upmode,providinga time-baseforasymmetricalpulsewidthmodula tion(PWM) ,respectively,whileCAP3andCAP4registersb ecometheperiodandcaptureshadowregisters, is a high-levelviewofboththecaptureandauxilia rypulse-widthmodulator(APWM) singlepinis ,it is aninput;in APWM mode,it is ,writinganyvaluetoCAP1/CAP2activeregiste rsalsowritesthesamevaluetothecorrespondi ngshadowregistersCAP3 May2009 RevisedOctober2009 EnhancedCapture(eCAP)ModuleSubmitDocumen tationFeedbackCopyright 2009,TexasInstrumentsIncorporatedTSCTR(c ounter 32 bit)RSTCAP1(APRD active)LDCAP2(ACMP active)LDCAP3(APRD shadow)LDCAP4(ACMP shadow)LDContinuous /OneshotCapture ControlLD1LD2LD3LD43232 PRD [0 31]CMP [0 31]CTR [0 31]ECAPxInterruptTriggerandFlagcontrolto PIECTR=CMP3232323232 ACMP shadowEventPrescaleCTRPHS(phase register 32 bit)
