Example: tourism industry

Configuring Source of Multiple ePWM Trip-Zone …

ApplicationReportSPRAAR4 (TZ) : (TZCTL) = CMPBCTR = CMPACTR_DirCTR = 0 CTR = PRDDeadBand(DB)CounterCompare(CC)ActionQ ualifier(AQ)EPWMxAEPWMxBCTR = CMPB WCTR = 0 EPWMxINTEPWMxSOCAEPWMxSOCBEPWMxAEPWMxBTZ 1 to TZ6 CTR = CMPA WTime-Base(TB)CTR = PRD WCTR = 0 WCTR_DirEPWMxSYNCIEPWMxSYNCOEPWMxTZINTPW M-chopper(PC)EventTriggerandInterrupt(ET )TripZone(TZ) (TZ1toTZ6)thataresourcedfromthegeneral-p urposeinput/output(GPIO) , : TripinputsTZ1toTZ6canbeflexiblymappedtoa nyePWMmodule. Uponafaultcondition,outputsEPWMxAandEPWM xBcanbeforcedtooneofthefollowing: High Low High-impedance Noactiontaken Supportforone-shottrip(OSHT)formajorshor tcircuitsorover-currentconditions Supportforcycle-by-cycletripping(CBC)for currentlimitingoperation Eachtrip-zoneinputpincanbeallocatedtoeit herone-shotorcycle-by-cycleoperation.

Application Report SPRAAR4–October 2007 Configuring Source of Multiple ePWM Trip-Zone Events Jeff Stafford.....

Tags:

  Multiple, Course, Zones, Configuring, Configuring source of multiple epwm, Epwm

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Configuring Source of Multiple ePWM Trip-Zone …

1 ApplicationReportSPRAAR4 (TZ) : (TZCTL) = CMPBCTR = CMPACTR_DirCTR = 0 CTR = PRDDeadBand(DB)CounterCompare(CC)ActionQ ualifier(AQ)EPWMxAEPWMxBCTR = CMPB WCTR = 0 EPWMxINTEPWMxSOCAEPWMxSOCBEPWMxAEPWMxBTZ 1 to TZ6 CTR = CMPA WTime-Base(TB)CTR = PRD WCTR = 0 WCTR_DirEPWMxSYNCIEPWMxSYNCOEPWMxTZINTPW M-chopper(PC)EventTriggerandInterrupt(ET )TripZone(TZ) (TZ1toTZ6)thataresourcedfromthegeneral-p urposeinput/output(GPIO) , : TripinputsTZ1toTZ6canbeflexiblymappedtoa nyePWMmodule. Uponafaultcondition,outputsEPWMxAandEPWM xBcanbeforcedtooneofthefollowing: High Low High-impedance Noactiontaken Supportforone-shottrip(OSHT)formajorshor tcircuitsorover-currentconditions Supportforcycle-by-cycletripping(CBC)for currentlimitingoperation Eachtrip-zoneinputpincanbeallocatedtoeit herone-shotorcycle-by-cycleoperation.

2 Interruptgenerationispossibleonanytrip-z onepin. Software-forcedtrippingisalsosupported. (EPWMxAandEPWMxB)canbesourcedbyanyorallo fthesixTZninputs(TZ1toTZ6).Sincethereiso nlyoneTZflagforaselectedTZtype(one-shoto rcycle-by-cycle), ,thecodecouldreadPIEIFR2todeterminewhich TZ ,andbeforeentryintotheISR; ,2801x,2804xSystemControlandInterruptsRe ferenceGuide(SPRU712).ConfiguringSourceo fMultipleePWMTrip-ZoneEvents2 SPRAAR4 by-cycMode(CBC)CTR=ZeroTZFRC[CBC]TZ1TZ2T Z3TZ4TZ5TZ6 SyncClearSetSetOne-shotLatch(OSHT)ModeCl earTZSEL[CBC1 to CBC6]TZCLR[OST]TZSEL[OSHT1 to OSHT6]TZFRC[OSHT]SyncTZ6TZ5TZ4TZ3TZ2TZ1 TripLogicTripTripCBCTrip EventOSHTTrip EventEPWMxAEPWMxBEPWMxAEPWMxBTZCTL[TZB]T ZCTL[TZA]Async TripSetClearTZFLG[CBC]TZCLR[CBC]SetClear TZFLG[OST]DeterminingTrip-ZoneSourceInad ditiontoconfiguringaPWMchanneltotriponmu ltipleTZs, , ,withtheTMS320F2808device,TZ1sharesthesa mepinwithGPIO12,TZ2withGPIO13, ,TMS320F2808,TMS320F2806,TMS320F2802,TMS 320F2801,TMS320C2802,TMS320C2801,andTMS3 20F2801xDSPsDataManual(SPRS230).

3 , WhenInput=1 ClearSetTZCLR[INT]EPWMx_TZINT(PIE)LatchC learSetClearSetLatchLatchTZFLG[CBC]TZFLG [OST]TZEINT[CBC]TZCLR[CBC]CBCTrip EventTZEINT[OST]OSHTTrip EventTZCLR[OST]TZFLG[INT] ,asingleCBCorOSHT tripeventoccurs, , , ,thistripeventresultsinaparticularaction ontheselectedePWMchannel, (TZCTL)FieldDescriptionsBitsNameValueDes cription15 4 ReservedReserved3 2 TZBW henatripeventoccurs, ,2801x,2804xSystemControlandInterruptsRe ferenceGuide(SPRU712).00 Highimpedance(EPWMxB=High-impedancestate )01 ForceEPWMxBtoahighstate10 ForceEPWMxBtoalowstate11 Donothing, ,2801x,2804xSystemControlandInterruptsRe ferenceGuide(SPRU712).

4 00 Highimpedance(EPWMxA=High-impedancestate )01 ForceEPWMxAtoahighstate10 ForceEPWMxAtoalowstate11 Donothing, , , , , , ,theC280x,C2801xC/C++HeaderFilesandPerip heralExamples(SPRC191)wasusedonanF2808eZ dsp .ThiscodewasmodifiedtoenableallsixTZnsfo rePWM1, , , , , (){//EnableallTZsasoneshottripsourcesEAL LOW; ; ; ; ; ; ;//WhatdowewantanyoftheTZstodo? ; ; ;EDIS;voidInitEPwm2 Example(){//EnableTZ1asoneshottripsource EALLOW; ; ; ;EDIS;}Withtheexamplesoftwareloadedandru nninginreal-timeontheF2808eZdsp, (sharedwithGPIO0)foundontheF2808eZdsp sP8 Connectorpin#9(P8-9). (sharedwithGPIO12) (sharedwithGPIO13) (sharedwithGPIO14) )forTZ4(sharedwithGPIO15) (sharedwithGPIO16) (sharedwithGPIO17)}

5 ForeachofthesetestsyouwillseeEPWM1A #P8 SignalP8 Pin#1+ +5V/NC2+ +5V/NC3 MUX_GPIO294 MUX_GPIO285 GPIO146 GPIO207 GPIO218 GPIO239 GPIO010 GPIO111 GPIO212 GPIO1313 GPIO414 GPIO1515 GPIO2716 GPIO1617 GPIO1318 GPIO13419 GND20 GND21 GPIO722 GPIO1523 GPIO1624 GPIO1725 GPIO1826 GPIO1927 MUX_GPIO3128 MUX_GPIO3029 MUX_GPIO1130 MUX_GPIO831 GPIO22/GPIO2432 MUX_GPIO1033 GPIO2534 GPIO2535 GPIO2636 GPIO3237 GPIO1238 GPIO3339 GND40 GNDC onfiguringSourceofMultipleePWMTrip-ZoneE vents6 SPRAAR4 (1)(GPxMUX1/2 Selection1(2)Selection2 Selection3 RegisterBitsbits=0,0)(GPxMUX1/2bits=0,1) (GPxMUX1/2bits=1,0)(GPxMUX1/2bits=1,1)GP AMUX11-0 GPIO0 EPWM1A(O)Reserved(3)Reserved(3)3-2 GPIO1 EPWM1B(O)SPISIMOD(I/O)Reserved(3)5-4 GPIO2 EPWM2A(O)Reserved(3)Reserved(3)7-6 GPIO3 EPWM2B(O)SPISOMID(I/O)Reserved(3)9-8 GPIO4 EPWM3A(O)Reserved(3)Reserved(3)11-10 GPIO5 EPWM3B(O)SPICLKD(I/O)ECAP1(I/O)13-12 GPIO6 EPWM4A(O)EPWMSYNCI(I)EPWMSYNCO(O)15-14 GPIO7 EPWM4B(O)SPISTED(I/O)ECAP2(I/O)17-16 GPIO8 EPWM5A(O)CANTXB(O)ADCSOCAO(O)19-18 GPIO9 EPWM5B(O)SCITXDB(O)ECAP3(I/O)21-20 GPIO10 EPWM6A(O)CANRXB(I)ADCSOCBO(O)23-22 GPIO11 EPWM6B(O)SCIRXDB(I)ECAP4(I/O)25-24 GPIO12TZ1(I)CANTXB(O)SPISIMOB(I/O)27-26 GPIO13TZ2(I)

6 CANRXB(I)SPISOMIB(I/O)29-28 GPIO14TZ3(I)SCITXDB(O)SPICLKB(I/O)31-30 GPIO15TZ4(I)SCIRXDB(I)SPISTEB(I/O)GPAMUX 21-0 GPIO16 SPISIMOA(I/O)CANTXB(O)TZ5(I)3-2 GPIO17 SPISOMIA(I/O)CANRXB(I)TZ6(I)(1)ThewordRe servedmeansthatthereisnoperipheralassign edtothisGPxMUX1 , (2)GPxMUX1/2referstotheappropriateMUXreg isterforthepin,GPAMUX1,GPAMUX2orGPBMUX1. (3) ,2806,2802, , TMS320x28xx,28xxxEnhancedPulseWidthModul ator( epwm )ModuleReferenceGuide(SPRU791) TMS320x280x,2801x,2804xSystemControlandI nterruptsReferenceGuide(SPRU712) TMS320F2809,TMS320F2808,TMS320F2806,TMS3 20F2802,TMS320F2801,TMS320C2802,TMS320C2 801,andTMS320F2801xDSPsDataManual(SPRS23 0) C280x,C2801xC/C++HeaderFilesandPeriphera lExamples(SPRC191) eZdsp2808 TechnicalReference( )SPRAAR4 October2007 ConfiguringSourceofMultipleePWMTrip-Zone Events7 SubmitDocumentationFeedbackIMPORTANTNOTI CET exasInstrumentsIncorporatedanditssubsidi aries(TI)

7 Reservetherighttomakecorrections,modific ations,enhancements,improvements, , , ,eitherexpressorimplied,isgrantedunderan yTIpatentright,copyright,maskworkright,o rotherTIintellectualpropertyrightrelatin gtoanycombination,machine, , ,conditions,limitations, (suchaslifesupport)whereafailureoftheTIp roductwouldreasonablybeexpectedtocausese verepersonalinjuryordeath, ,andacknowledgeandagreethattheyaresolely responsibleforalllegal,regulatoryandsafe ty-relatedrequirementsconcerningtheirpro ductsandanyuseofTIproductsinsuchsafety-c riticalapplications, , "enhancedplastic." 'srisk, ,iftheyuseanynon-designatedproductsinaut omotiveapplications, :TexasInstruments,PostOfficeBox655303,Da llas,Texas75265 Copyright 2007,TexasInstrumentsIncorporat


Related search queries