TMS320x2802x eCAP捕获参考指南

  • 格式:pdf
  • 大小:265.80 KB
  • 文档页数:35

TMS320F2802xPiccoloEnhancedCapture

(eCAP)Module

ReferenceGuide

LiteratureNumber:SPRUFZ8March20092SPRUFZ8–March2009SubmitDocumentationFeedbackContentsPreface........................................................................................................................................61Introduction.........................................................................................................................82Description..........................................................................................................................83CaptureandAPWMOperatingMode......................................................................................94CaptureModeDescription...................................................................................................10

4.1EventPrescaler..........................................................................................................10

4.2EdgePolaritySelectandQualifier....................................................................................11

4.3Continuous/One-ShotControl..........................................................................................11

4.432-BitCounterandPhaseControl....................................................................................12

4.5CAP1-CAP4Registers..................................................................................................13

4.6InterruptControl..........................................................................................................13

4.7ShadowLoadandLockoutControl...................................................................................14

4.8APWMModeOperation................................................................................................15

5CaptureModule-ControlandStatusRegisters.....................................................................16

6RegisterMapping...............................................................................................................24

7ApplicationoftheECAPModule.........................................................................................24

7.1Example1-AbsoluteTime-StampOperationRisingEdgeTrigger..............................................25

7.2Example2-AbsoluteTime-StampOperationRisingandFallingEdgeTrigger................................28

7.3Example3-TimeDifference(Delta)OperationRisingEdgeTrigger............................................30

7.4Example4-TimeDifference(Delta)OperationRisingandFallingEdgeTrigger..............................32

8ApplicationoftheAPWMMode............................................................................................34

8.1Example1-SimplePWMGeneration(IndependentChannel/s).................................................34

SPRUFZ8–March2009TableofContents3SubmitDocumentationFeedbackwww.ti.com

ListofFigures

1CaptureandAPWMModesofOperation.................................................................................92CaptureFunctionDiagram................................................................................................103EventPrescaleControl....................................................................................................114PrescaleFunctionWaveforms............................................................................................115DetailsoftheContinuous/One-shotBlock..............................................................................126DetailsoftheCounterandSynchronizationBlock.....................................................................137InterruptsineCAPModule................................................................................................148PWMWaveformDetailsOfAPWMModeOperation..................................................................159Time-StampCounterRegister(TSCTR)................................................................................1610CounterPhaseControlRegister(CTRPHS)...........................................................................1611Capture-1Register(CAP1)..............................................................................................1612Capture-2Register(CAP2)...............................................................................................1613Capture-3Register(CAP3)...............................................................................................1714Capture-4Register(CAP4)...............................................................................................1715ECAPControlRegister1(ECCTL1).....................................................................................1716ECAPControlRegister2(ECCTL2).....................................................................................1917ECAPInterruptEnableRegister(ECEINT).............................................................................2118ECAPInterruptFlagRegister(ECFLG).................................................................................2219ECAPInterruptClearRegister(ECCLR)................................................................................2220ECAPInterruptForcingRegister(ECFRC).............................................................................2321CaptureSequenceforAbsoluteTime-stampandRisingEdgeDetect..............................................2622CaptureSequenceforAbsoluteTime-stampWithRisingandFallingEdgeDetect...............................2823CaptureSequenceforDeltaModeTime-stampandRisingEdgeDetect..........................................3024CaptureSequenceforDeltaModeTime-stampWithRisingandFallingEdgeDetect...........................3225PWMWaveformDetailsofAPWMModeOperation...................................................................34