您好,欢迎来到刀刀网。
搜索
您的当前位置:首页CC26xxCC13xx Power Management

CC26xxCC13xx Power Management

来源:刀刀网
CC26xx/CC13xxPowerManagementSoftwareDeveloper's

ReferenceGuide

LiteratureNumber:SWRA486

August2015

Contents

123

Abbreviations......................................................................................................................5PowerManagementIntroduction...........................................................................................5TI-RTOSPowerModes..........................................................................................................6

3.13.2

ActiveMode...............................................................................................................6IdleMode

4

5

.................................................................................................................7

3.3StandbyMode............................................................................................................83.4ShutdownMode.........................................................................................................13ImplementationConsiderations............................................................................................1.1DeviceInitializing.......................................................................................................1.2RecharginginStandby.................................................................................................184.3OperatingtheDC/DCConverter.....................................................................................184.4ConfiguringDeviceforExternalInputInterruptsandWakeup....................................................194.5Oscillators................................................................................................................204.6AuxiliaryDomain........................................................................................................224.7RTC.......................................................................................................................234.8DebuggingThroughPowerModes...................................................................................244.9UsingPeripherals.......................................................................................................24References........................................................................................................................24

2TableofContents

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.com

ListofFigures

12345671011121314151617181920

IdleEnterSequence.........................................................................................................7StandbyEnterSequence,Part1..........................................................................................8StandbyEnterSequence,Part2..........................................................................................9StandbyEnterSequence,Part3.........................................................................................10StandbyExitSequence,Part1...........................................................................................11StandbyExitSequence,Part2...........................................................................................12

...............................................................................................

trimDevice()functioninsetup.c...........................................................................................TI-RTOSInitialization......................................................................................................ConfigureRechargeSettingsBeforeEnteringStandby...............................................................ConfigureRechargeSettingsAfterExitingStandby...................................................................CCFGFieldsForEnablingtheDC/DCConverterDuringActiveandStandbyMode.............................TheVoltageThresholdForTurningOfftheDC/DCConverter.......................................................TheDriverlibFunctionThatEnablesandDisablestheDC/DCConverterattheGivenCCFGThreshold.....SwitchingfromRCOSC_HFtoXOSC_HF..............................................................................LFConfigurationinccfg.c.................................................................................................CodeforDisablingLFClockQualifiers..................................................................................ConfigurationWhenUsinganExternalLFClockSource.............................................................PoweringUptheAuxiliaryPowerDomain..............................................................................PoweringDowntheAuxiliaryDomain...................................................................................

ShutdownEnterSequence

1416171818181819202121212222

ListofTables

12

SoftwareConfigurablePowerModes.....................................................................................6SensorController/AuxiliaryPowerManagement.......................................................................23

SWRA486–August2015

SubmitDocumentationFeedback

ListofFigures

Copyright©2015,TexasInstrumentsIncorporated

3

ReferenceGuide

SWRA486–August2015

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

PowermanagementfortheCC26xx/CC13xxfamilyisimplementedaspartoftheTI-RTOSkernel.Thisdocumentgivesanoverviewofthisimplementationandwhattoconsiderwhenportingthisimplementationtoanothersoftwareframework.

ThisdocumentcoversthepartsspecifictoCC26xx/CC13xxbutdoesnotcoverthegenericTI-RTOSkernelimplementation.Thisguidealsodescribestasksthatthesoftwaremustperformtooperatethisdevicesafely.Tasksareinboldfollowedbytheirdescriptions.

4CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comAbbreviations

1Abbreviations

ADCAONCCFGCM3OSCOSC_DIGPRCMRCOSC_HFRCOSC_LF

RTCRTOSTDCTI-RTOSTRMWFIXOSC_HFXOSC_LF

Analog-to-DigitalConverter

Always-OnDomain

CustomerConfigurationFlashareaCortex-M3,mainsystemcontroller

Oscillator

DigitalpartofoscillatormodulePower-Reset-ClockManagementHigh-frequencyRCoscillatorLowfrequencyRCoscillator

Real-TimeClockRealTimeOperatingSystemTime-to-DigitalConverterTIReal-TimeOperatingSystemTechnicalReferenceManual

Wait-For-Interrupt

High-frequencycrystaloscillatorLow-frequencycrystaloscillator

2PowerManagementIntroduction

IntheTI-RTOSimplementationforCC26xx/CC13xx,powermanagementimplementswithintheRTOSkernel.Becauseofthisimplementation,youcanwriteapplicationswithouthandlingpowermanagement.Theapplicationrequiresnochangeswhenupgradingtonewversionsofthekernelwithfurtheroptimizedpowermanagement.HandlingpowermanagementwithinTI-RTOSoccursbyconfiguringthesystemtothelowestpowermodewhilesupportingtherequestedresourcesfromtheapplication.TheTI-RTOSinstallationisavailableattheTIwebsite.Thisinstallationincludesthesourcecodeforhandlingpowermanagement.

TI-RTOSsupportsthefollowingfourpowermodes:•Active•Idle

•Standby•Shutdown

Section3presentsthemodesindetail.Inactiveandidlemode,allresourcesonthedeviceareavailable.Thestandbyandshutdownmodesareoptimizedforpowerconsumptionandlimitedresourcesareavailableinthesemodes.InTI-RTOS,theapplicationdoesnotselectwhichpowermodetoenter.Thekernelselectsthepowermodebasedonthenextwakeupandwhichresourcestheapplicationrequests(suchastheradiooranotherperipherals).Theapplicationmustcallonlyshutdownmodebecausewakingupfromshutdownforcesarebootofthesystem.

TheTI-RTOSimplementationisexplainedinisdocumentedwithintheTI-RTOSinstallation.ThisdocumentreferencestheTI-RTOSimplementationdocumentbutfocusesonhowtoconfigurethehardwarewhennotusingTI-RTOS.ThesamplecodeinthisdocumentisfromtheTI-RTOSimplementationandthedriverlibAPIs.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

5

TI-RTOSPowerModeswww.ti.com

3TI-RTOSPowerModes

TI-RTOSsupportsfourdifferentpowermodes,showninTable1.

Table1.SoftwareConfigurablePowerModes

ModeSystemCPUSystemSRAMRegisterRetention(1)VIMS_PD(flash)RFCORE_PD

(radio)SERIAL_PDPERIPH_PDSensorControllerSupplySystem

CurrentTimefromCPUactivetoreadyforWakeup(2)Wake-uptimetoCPUactive(2)

High-speedclockLow-speedclockWakeuponRTCWakeuponpin

edgeWakeuponresetpin

(1)

SoftwareConfigurablePowerModes

ActiveActiveOnFullOnAvailableAvailableAvailableAvailableOnApplicationdependent

––XOSC_HForRCOSC_HFXOSC_LForRCOSC_LFAvailableAvailableAvailable

IdleOffOnFullAvailableAvailableAvailableAvailableAvailableOnApplicationDependentTBD25µsXOSC_HForRCOSC_HFXOSC_LForRCOSC_LFAvailableAvailableAvailable

StandbyOffRetainedPartialOffOffOffOffAvailableDuty-cycledApprox.1µA

TBD300µs(1)

OffXOSC_LForRCOSC_LFAvailableAvailableAvailable

Shutdown

OffOffNoOffOffOffOffOffOffApprox.0.1µA

TBDApprox.1.5ms

OffOffOffAvailableAvailable

ResetPinHeld

OffOffNoOffOffOffOffOffOffApprox.0.1µA

Approx.1.5ms

OffOffOffOffAvailable

(2)

Whenanemulatorordebuggerisattachedtothedevice,thewake-uptimeisapproximately200µsshorterbecausethesystemwillnotentertruestandby.

NumbersincludeTI-RTOSoverhead.

ThissectiondescribeshowthesepowermodesareimplementedinTI-RTOSandhowtoportTI-RTOStoanothersoftwareframework.

3.1ActiveMode

Inactivemode,theCM3eitherexecutescodeorwaitsthroughaWFIinstructionforinterrupts.Systemresourcesareavailableinactivemode.TheCPUpowerdomain,peripherals,andradiomaybeactive.BecausetheresourcesonCC26xx/CC13xxareavailabletotheapplicationinthismode,thecurrentconsumptiondependsonwhichmodulesareused.

IftheCM3executedaWFIinstruction,itcanwakeupfromanyenabledinterruptsource.Thedifferencebetweenactiveandidlemode(seeSection3.2)isthattheCPUpowerdomainremainsoninactivemodeensuringaquickwakeup.ThewakeuptimefromidlemodeislongerbecausetheCPUpowerdomainmustbeturnedonagain.

6CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comTI-RTOSPowerModes

3.2IdleMode

Inidlemode,theCM3isindeep-sleepafterexecutingtheWFIinstruction.TheCM3waitsforinterruptstowakeup.TheCPUpowerdomainisofftoreducethecurrentconsumption.TheCPUpowerdomainincreasesthewake-uptimeofapproximately25µs.Considerthisincreaseiftheapplicationistimingsensitive.AlthoughtheCPUpowerdomainisoff,itretainsitscontents.Whenwakingupfromidlemode,theCM3resumesexecutingcodeatthepointitleftoffbeforeenteringidle.ThestateandregistercontentsoftheCM3remainunchanged.

Inidlemode,theapplicationprogramcanusesystemresources,includingthehigh-speedcrystal

oscillator,theradio,andtheperipherals.TheCM3canwakeupfromanyenabledinterruptsource.Fordetailsonenteringidlemode,seeFigure1.

ThecodeforenteringidlemodeisfromtheTI-RTOSimplementation.Finditatthefollowingpath:

C:\i\irtos_simplelink_#_##_##_##\\products\\bios_#_##_##_##\\packages\i\\sysbios\\family\\arm\\cc26xx\\Power_standbyPolicy.c.

Figure1.IdleEnterSequence

1.ConfigureflashtoremainoninIDLEornot—TheflashcanremainontosupportDMAtransactionsfromflashoriftheRFcoreneedstoaccesstheflash.Iftheapplicationrequirestheflashtoremainavailablewhileinidle,setthePRCM:PDCTL1bit(seeCC26xxTechnicalReferenceManual

[SWCU117])beforeenteringidle.Iftheapplicationdoesnotrequireflashaccesswhileinidle,clearthisbitforthelowestpowerconsumption.

2.AlwayskeepCacheretentiononinidle—Alwaysenablethecacheretentiontoensurefasterstartuptimeandeasiersoftwareimplementation.Thecurrentconsumptioncausedbyretainingthecacheinidleisnegligiblecomparedtothetotalidlecurrentconsumption.

3.TurnofftheCPUpowerdomain—EnsuretheCPUpowerdomainisoffwhentheCM3entersdeep-sleep.TheCPUpowerdomainisturnedoffaftertheCM3executestheWFIinstruction(withtheNVICSLEEP_DEEPbitset)andentersdeep-sleep.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

7

TI-RTOSPowerModeswww.ti.com

4.EnsureanypossibleoutstandingAONwritesarecompleted—IftheAONdomainhasany

outstandingwrites,thedrivermustensuretheycompletebeforeenteringidle.ThisfunctioncallstallstheCM3executionforuptooneSCLK_LFperiodbecausetheAONdomainrunsontheSCLK_LF.5.EnterIdle—PuttheCM3indeep-sleepthroughtheWFIinstructiontoenteridle.Ifthewake-up

sourceistheRTC,thesoftwaremustperformAONsynchronization(inStep4)beforereadingfromtheRTCmoduletoensuretheRTCvaluesareupdatedcorrectly.

3.3StandbyMode

Instandbymode,theCM3waitsindeep-sleepforinterruptstowakeupafterexecutingtheWFIinstruction.Beforeenteringstandby,powerdownsystemresources,includingthehigh-frequencyoscillator,radio,peripherals,andauxiliarydomain.Manysystemmoduleshaveretentioninstandby

includingtheCM3(seetheCC26xxTechnicalReferenceManual[SWCU117]fordetails).Afterwakingupfromstandby,theCM3resumesexecutingprogramsatthepointbeforeenteringstandby.

BecausetheCC26xx/CC13xxrunsonalow-powerLDOinstandby,mostsystemresourcesare

unavailableinstandby.UsetheRTC,whichrunsinstandby,towakeuptheCM3.TheCM3canwakeuponanyinterrupt-enabled,externalinputpin.

Theapplicationmustconsiderthelatencyassociatedwithenteringandexitingwhenusingstandbymode.Ifthenextwakeupisinlessthan1ms,theTI-RTOSimplementationdoesnotenterstandby.Iftheapplicationrequiresexacttiming,considerthelatencyassociatedwithenteringandwakingupfromstandby.TheTI-RTOSimplementationhandlesthislatencybyinsertingwake-upeventfourRTCedges(µs)earlierthantheeventtoensurethesystempowersonintimetoservicethewake-upeventscheduledbytheapplication.

TheTI-RTOSstandbyimplementationallowsavariationwherethecachecontentsareretained.Instandby,thesystemdrawsapproximately2µAmorethanwithoutretainingthecache.Systemstart-upfromstandbyistypicallyquicker.ThemainsystemRAMshouldalwaysberetainedinstandbymode.ThemainsystemRAMretentionisalsothedefaultconfigurationwhenthedevicebootsup.

ThefollowingcodeforenteringandexitingstandbyisfromtheTI-RTOSPower.cimplementation:

C:\i\irtos_simplelink_#_##_##_##\\products\\bios_#_##_##_##\\packages\i\\sysbios\\family\\arm\\cc26xx\\Power.c.

3.3.1StandbyEnterSequence

Figure2.StandbyEnterSequence,Part1

1.FreezetheIOsontheboundarybetweenMCUandAON—Latch(freeze)theinputandoutputpinstoavoidglitcheswheninstandby.Whentheinputsandoutputsarefrozen,thecurrentstateoftheinputsandoutputsisretainedwhileavailabletotriggerwakeuptotheCM3.Toconfiguretheinputsforwakeupfromstandby,seeSection4.4.1.

8

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comTI-RTOSPowerModes

2.IfXOSC_HFisactive,forceitoff—Turnoffthehigh-speedcrystaloscillatorbeforeentering

standby.Thehardwareturnsoffthehigh-speedRCoscillatorwhenenteringstandby.Fordetailsonhowtoconfigurethehigh-speedcrystaloscillator,seeSection4.5.1.

3.AllowAUXtopowerdown—DisconnecttheauxiliarydomainfromtheMCUinstandby.

4.Makesurewritestakeeffect—EnsurethewritestoAONdomaincompletebeforecontinuing.

Figure3.StandbyEnterSequence,Part2

5.Queryandsavedomainstatesbeforepoweringthemoff—Turnoffallpowerdomainsbeforeenteringstandby.

6.GaterunningdeepsleepclocksforCryptoandDMA—ClearboththecryptoandDMAdeep-sleepclockenablebitsbeforeenteringstandby.Formoreinformation,seethePRCM:VDCTLregister.7.Makesureclocksettingstakeeffect—LoadtheclocksettingsfromthePRCMmodule.

8.RequesttopoweroffofdomainsintheMCUvoltagedomain—TurnoffpowerdomainsinsidetheMCUvoltagedomain.

9.RequestuLDOduringstandby—Usethiscalltorequesttousethemicro-LDOduringstandby.Thesystemrunsoffthemicro-LDOinstandby.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

9

TI-RTOSPowerModeswww.ti.com

Figure4.StandbyEnterSequence,Part3

10.Ifdon'twantretentioninstandby,disableitnow...—DisablecacheretentionandturnofftheVIMSpowerdomaintoachievelowestpowerconsumptioninstandby.•10.1GetcurrentVIMSmode—ReadthecurrentVIMSmode.

•10.2Waitifinvalidateinprogress...—EnsurethattheVIMSmoderemainsthesame.•10.3DisablecacheRAMretention—DisablecacheRAMretention.

•10.4TurnofftheVIMS—SettheVIMSmodetooff.ThecacheisoffandtheCM3reads

instructionsfromflash.

11.Setuprechargeparameters—Configuresaferechargesettingsusedwheninstandby.AXoscInHighPowerModeflagindicatesthatthehigh-frequencycrystaloscillatorisoffinstandby.12.Makesureallwriteshavetakeneffect—EnsureallAONwriteshavetakeneffect.

13.InvokedeepsleeptogotoSTANDBY—PuttheCM3indeep-sleepthroughtheWFIinstructiontoenterstandby.

10CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comTI-RTOSPowerModes

3.3.2StandbyExitSequence

Figure5.StandbyExitSequence,Part1

14.Ifdidn'tretaincacheinstandby,re-enableretentionnow—Enablecacheafterwakingupfromstandbyifcacheretentionwasdisabled.

15.ForcepoweronofAUXtokeepitonwhensystemisnotsleeping;thisalsocountsasawritetotheAONinterfaceensuringthatafollowingsyncoftheAONinterfacewillforceanupdateofallregisters—ToaccesstheOSC_DIGregisterstoconfiguretheoscillators,forcetheauxiliarydomainonafterwakingupfromstandby.

16.IfXOSC_HFwasforcedoffabove,initiateswitchback—Turnonthehigh-speedcrystaloscillatorifitwasenabledbeforeenteringstandby.Fordetailsonhowtoconfigurethehigh-speedcrystaloscillator,seeSection4.5.1.

17.Restorepowerdomainstatesineffectbeforestandby—Turnonallpowerdomainsthatwereonbeforeenteringstandby.

11

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

TI-RTOSPowerModeswww.ti.com

18.RestoredeepsleepclocksofCryptoandDMA—Restoredeep-sleepclocksettingsforCryptoandDMAmodulesastheywerebeforeenteringstandby.

19.Makesureclocksettingstakeeffect—LoadclocksettingsintoPRCMforthemtotakeeffect.

Figure6.StandbyExitSequence,Part2

20.ReleaserequestforuLDO—Releasethemicro-LDOrequesttodisablerunningonthemicro-LDOwhenenteringidle.

21.SettransitionstatetoEXITING_SLEEP—TI-RTOS-specificcode

22.Signalclientsregisteredforearlypost-sleepnotification;thisshouldbeusedtoinitializeanytimingcriticalorIOdependenthardware—Signalperipheraldriverstoreinitializetheirstatebecausemoduleswithoutretentionlosetheircontents.TI-RTOS-specificcode.Fordetailsonwhichmoduleshaveretention,seeCC26xxTechnicalReferenceManual(SWCU117).

23.DisableIOfreezeandensureRTCshadowvalueisupdated—Opentheinputandoutputlatches.Becausetheperipheraldrivershavebeenreinitialized,inputsandoutputshavenoglitches.24.Re-enableinterrupts—Re-enableinterrupts.TI-RTOS-specificcode

25.Signalallclientsregisteredforlatepost-sleepnotification—Theperipheraldriversdonotusethisnotification.(TI-RTOS-specificcode)

26.Nowclearthetransitionstatebeforere-enablingscheduler—TI-RTOS-specificcode27.Re-enableSwischeduling—TI-RTOS-specificcode

12

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comTI-RTOSPowerModes

28.Adjustrechargeparameters—Adjusttherechargesettingstooptimizepowerconsumptionthenexttimetheapplicationentersstandbymode.

3.4ShutdownMode

Inshutdownmode,theCC26xx/CC13xxdeviceshutsoffexceptfortheinputandoutputpins.Thedevicecanwakeuponanyinputpin(configuredthroughtheIOCFGnregisters).Thesystemcompletelyre-bootswhenwakingupfromshutdown.YoucancallSysCtrlResetSourceGet()todetectthatthedeviceisbootingfromshutdown.FordetailsontheTI-RTOSimplementationofenteringshutdown,seeFigure7.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

13

TI-RTOSPowerModeswww.ti.com

Figure7.ShutdownEnterSequence

14

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comTI-RTOSPowerModes

1.SwitchtoRCOSC_HF—Switchtohigh-speedRCoscillator.

2.MakesureDMAandCRYTOclocksareoffbeforeenteringshutdown—EnsuretheDMAandcryptodeep-sleepclocksareturnedoff.

3.PowerOFFAUXanddisconnectfrombus—Configuretheauxiliarydomain.4.RemoveAUXforceON—Requesttopowerofftheauxiliarydomain.

5.ResetAONeventsourceIDstoavoidpendingeventspoweringonMCU/AUX—EnsurenoeventsfromAONpreventthedevicefromenteringshutdown.

6.Enableshutdown–thislatchestheIOs,soconfigurationofIOCFGxregistersmustbedonepriortothis—Configureshutdownmode.Becausethisfunctionalsolatchestheinputsandoutputs,configureanyinputandoutput(suchasconfiguringwhichinputsandoutputstowakeupon)beforeexecutingthisfunction.

7.SyncAON—EnsureAONconfigurationstakeeffect.

8.WaituntilAUXpoweredoff—Ensuretheauxiliarydomainisoff.

9.RequesttopoweroffMCUwhengotodeepsleep—RequesttopowerofftheMCUvoltagedomainwhenCM3entersdeep-sleep.

10.TurnoffpowerdomainsinsideMCUVD(BUS,FL_BUS,RFC,CPU)—TurnoffpowerdomainsinsidetheMCUvoltagedomain.

11.Deepsleeptoactivateshutdown—Enterdeep-sleepbyexecutingWFIinstruction.WFIinstructionshutsdownthesystem.BecausetheCM3rebootswhenwakingup,noinstructionsexecuteafterthePRCMDeepSleep()function.Whenwakingupfromashutdown,thedevicereboots.Theinputandoutputstateisretainedthroughshutdowntoavoidglitches.Softwareusingtheshutdown-powermodecallsSysCtrlResetSourceGet()earlyintheapplicationtocheckthewake-upsource.Ifthedevicewakesupfromashutdown,the

applicationrestorestheconfigurationoftheinputandoutputregistersbeforeopeningtolatchestoavoidglitches.WriteAON_SYSCTL:SLEEPCTL[0]to1tounlatchtheinputsandoutputs.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

15

ImplementationConsiderationswww.ti.com

4ImplementationConsiderations

ThissectiondescribesimportantdetailstoconsiderwhenwritingsoftwarefortheCC26xx/CC13xxfamily.

4.1

4.1.1

DeviceInitializing

Low-LevelInitializing

TheapplicationmustcalltrimDevice()insetup.c(availableinthedriverlibsoftwarepackage)afterbooting.ThisfunctiontrimsthedifferentmodulesonthedevicenotcompletedbyROMbootcode.Thistrimmingisrequiredforthedevicetooperatesafely.ThiscoderunsagainaftercomingoutofshutdownbecausetheCM3reboots.TheCM3doesnotrebootwhencomingoutofstandbyoridle.

Figure8.trimDevice()functioninsetup.c

NOTE:

AcheckexistsinthetrimDevice()functiontoensurethecorrectversionofdriverlibisonthedevice.Ifthischeckfails,thedevicespinsinaninfinitelooptoindicatethatthecompiledsoftwarelibraryisunsupportedbythegivendevice.

16CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comImplementationConsiderations

4.1.2TI-RTOSInitializating

FormoreinformationonthedeviceinitializationbyTI-RTOS,seeFigure9.

Figure9.TI-RTOSInitialization

1.Makesureallcodeiscompiledwiththesameversionofdriverlib—EnsurethattheTI-RTOSimplementationisbuiltwiththesameversionofdriverlibastherestoftheapplication.

2.SetstandbydisallowconstraintpendingLFclockqualifierdisabling—TI-RTOS-specificcodetoensuretheapplicationentersstandbyaftertheLFclocksourceselectedinCCFGisselectedandstable.DisabletheLFclockqualifiersafterselectingtheLFclocksource.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

17

ImplementationConsiderationswww.ti.com

4.2RecharginginStandby

Whenthedeviceisinthestandbypowermode,thehardwareturnsofftheinternalDC/DCconverterandLDOstosavepower.Thedevicemustwakeupperiodicallytorechargetheinternalvoltagestoretainthechipstate.Beforeenteringstandby,youmustconfiguretheserechargesettings.Formoredetailsonthesesettings,seeFigure10.BecausetherechargesettingsresideintheAONdomain,theapplicationmustAONsyncafterwritingtherechargesettingstoensuretheytakeeffectbeforeenteringstandby.

Figure10.ConfigureRechargeSettingsBeforeEnteringStandby

Afterthedevicewakesupfromstandbymode,settherechargeparametersthroughthecallinFigure11tooptimizethecurrentconsumptionthenexttimethedeviceentersstandby.Afterwakingupfromstandby,softwaremustAONsyncbeforeadjustingtherechargesettingstoensurethesettingsarecorrectlyupdated.

Figure11.ConfigureRechargeSettingsAfterExitingStandby

4.3OperatingtheDC/DCConverter

TheCC26xx/CC13xxdevicefamilyhasanon-chipDC/DCconverterwhichenableslow-power

applications.TheDC/DCconverterisenabledbytrimDevice()basedontheCCFGfieldsinFigure12,andhasaseparateenablefieldforoperatinginactiveandstandbymodes(thehardwareperiodically

rechargesinstandbymode).Whenthedeviceoperatesinexternalregulatormode,disabletheDC/DCconverterduringactiveandstandby/rechargemodes.

Figure12.CCFGFieldsForEnablingtheDC/DCConverterDuringActiveandStandbyModeBecausetheDC/DCconverteronlyoperateswithoptimumefficiencyathighVDDSvoltages,turnofftheDC/DCconverterwhenVDDSdecreases.ToconfigurethevoltagethresholdtoturnofftheDC/DCconverter,usetheCCFGfieldinFigure13.Donotmodifythisvoltagethreshold.

Figure13.TheVoltageThresholdForTurningOfftheDC/DCConverter

18CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comImplementationConsiderations

TheapplicationusesthefunctioninFigure14,thethresholdconfiguredintheCCFGfield,todecidewhentoturnofftheDC/DCconverter.Theapplicationcallsthisfunctionatperiodicintervals.ThisfunctionalsoturnsontheDC/DCconverterifthevoltageexceedsthethreshold(forexample,whenthebatteryisrecharging).

Figure14.TheDriverlibFunctionThatEnablesandDisablestheDC/DCConverterattheGivenCCFG

Threshold

4.4

4.4.1

ConfiguringDeviceforExternalInputInterruptsandWakeup

InterruptandWake-upfromActive,Idle,andStandby

Configuringthedeviceforexternalinputinterruptsandwakeupsfromactive,idle,andstandbypowermodesisa3-stepprocess(seePINCC26XX.cforreference).1.EnabletheINT_EDGE_DETECTinterrupttotheCM3.

2.EnablewakeupfromstandbyonaninputbyconfiguringoneofthefouravailablewakeupsourcesinAON_EVENT:MCUWUSELtowakeuponanyPAD(0x20).(TI-RTOSusesAON_EVENT:MCUWUSEL.WU1_EV.)

3.EnabletheindividualDIOinterruptsbyconfiguringtheIOCFGn[18:16]bits.

Ifmultipleinputandoutputpinsareenabledforinterrupt,softwarereadstheGPIO:EVFLAGS31_0to

decodewhichinputpintriggeredtheinterrupt.Write1tothecorrespondingGPIO:EVFLAGS31_0tocleartheinterrupt.

4.4.2WakeupfromShutdownMode

ConfiguringtheIOCFGn[28:27]bitstoconfigurethedevicetowakeupfromshutdownonanexternalinputandoutput.Thedevicerebootswhenwakingupfromshutdown.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

19

ImplementationConsiderationswww.ti.com

4.5

4.5.1

Oscillators

High-FrequencyOscillators

TheCC26xx/CC13xxbootswiththe48-MHzhigh-speedRCoscillatorthatclockstheCM3.Whenusingtheradio,switchthemainsystemclocktothehigh-speedcrystaloscillator.ThecodeinFigure15showshowtochangetothehigh-speedcrystaloscillator(seethefunctionsindriverlibmodulesosc.h/osc.c).

Figure15.SwitchingfromRCOSC_HFtoXOSC_HF

NOTE:Thehigh-speedcrystaloscillatordoesnotstartimmediatelyandtheapplicationcanperform

othertasksrunningontheRCOSC_HFwhiletheXOSC_HFstarts.

Tooptimizepowerconsumption,anotherfunctiongivestheapplicationanestimateofthelengthofthenextXOSC_HFstartup.Thestart-uptimedependsonthefollowingthreefactors:•HowlongtheXOSC_HFhasbeenoff•Theoperationalparametersofthecrystal•ThefrequencyoftheRCOSC_HF

TheOSCHF_GetStartupTime(uint32_ttimeUntilWakeupInMs)returnsanestimateoftheexpected

XOSC_HFstart-uptime,dependingonhowlongtheXOSC_HFhasbeenoff.Forexample,theapplicationcanusethisinformationtoschedulewakeupsandensurethattheXOSC_HFstartsupbeforeusingtheradioandtransmittingapacket.

NOTE:

YoumustenabletheRTCforthisfunctionalitytoworkbecausetheoscillatordriverusestheRTCtocalculatethestart-uptime.

YoumustturnofftheXOSC_HFbeforeenteringstandbyorshutdown.ToturnofftheXOSC_HF,callOSCHF_SwitchToRcOscTurnOffXosc().

NOTE:YoucannotswitchtotheRCOSC_HFbeforeyouhaveswitchedtotheXOSC_HF.Aborting

aswitchtoXOSC_HFisnotsupported.

20CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comImplementationConsiderations

4.5.2Low-FrequencyOscillators

Modifythecustomerconfigurationareatoselectthelow-frequencyclocksource.TheapplicationmustensurethattheLFclocksourceselectedinCCFGisselectedandstablebeforeenteringstandbymode.TheLFclocksourceonwhichthedeviceisrunningcanbereadthroughthedriverlibfunctionOSCClockSourceGet(…).FortheconfigurationsettingsinCCFG,seeFigure16.

Figure16.LFConfigurationinccfg.c

WhenthedevicerunningontheselectedLFclocksourceasspecifiedinCCFG,youmustdisabletheLFclockqualifiercircuitrybeforeenteringstandbyforthefirsttime.SetbitsOSC_DIG:CTL0[29:28]asinFigure17.

Figure17.CodeforDisablingLFClockQualifiers

IftheapplicationwantstouseanexternalLFclocksource,anotherMCUcanapplytheLFclocktoanyinputandoutputpin.

1.ConfigurethechoseninputandoutputandtheRTCincrementvalueasinFigure18.2.ApplywhentrimDevice()runs.

AnRTCincrementvalueof0x800000correspondstoafrequencyof32.768kHz.SeeAON_RTC:SUBSECINCforfurtherdetails.

Figure18.ConfigurationWhenUsinganExternalLFClockSource

4.5.3

RCOscillatorCalibration

BoththeRCOSC_HFandRCOSC_LFfrequencyshiftwhenthetemperaturechangesandtheoscillatorsage.CalibratetheseoscillatorsperiodicallyagainsttheXOSC_HF.

CalibratingtheRCOSC_HFgivesmoreaccuratetimingwhenrunningthesystemoffthisclockandstartsuptheXOSC_HFfaster.CalibratingtheRCOSC_LFgivesmoreaccuratetimingfortheRTCwheninstandby.IftheRCOSC_LFisunusedbytheapplication,calibratingthisoscillatorisunnecessary.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

21

ImplementationConsiderationswww.ti.com

TheauxiliarydomaincontainsaTDCyoucanusetocalibratetheseoscillatorsagainsttheXOSC_HF.TI-RTOScontainsanimplementationofcalibratingboththeRCOSC_HFandRCOSC_LFandcanbea

referenceforthosewhomustcalibrateRCoscillatorswithoutTI-RTOS.ThefollowingimplementationisintheTI-RTOSinstallation:

C:\i\irtos_simplelink_#_##_##_##\\products\\bios_#_##_##_##\\packages\i\\sysbios\\family\\arm\\cc26xx\\Power_calibrateRCOSC.c.

4.6AuxiliaryDomain

TurnontheauxiliarydomainfortheCM3toaccessthemodulesintheauxiliarydomain,includingtheOSC_DIGregisterstoconfiguretheoscillators.Powerofftheauxilliarydomainbeforeenteringstandbyandshutdown.Forfurtherdetails,seeSection3onenteringandexitingpowermodes.

4.6.1PoweringontheAuxiliaryDomain

Theauxiliarydomainisforced-onthroughthecallsinFigure19.Untilyouturnonthedomain,the

applicationshouldnotaccessanymodulesinsidetheauxiliarydomainorOSC_DIG.Theapplicationmaycompleteothertaskswhilewaitingfortheauxiliarydomaintopowerup,whichtakesapproximately50µs.

Figure19.PoweringUptheAuxiliaryPowerDomain

4.6.2

PoweringDowntheAuxiliaryDomain

TheCM3mustreleasetheauxiliaryforce-onbeforeenteringstandbyandshutdown(notrequiredwhenenteringidle)asinFigure20.IfthesensorcontrollerisrunningwhenAONWUCAuxWakeupEvent(...)functioniscalled,theauxiliarydomainremainsonuntilthesensorcontrolleridles.Thesystementersstandby.

Figure20.PoweringDowntheAuxiliaryDomain

22CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

www.ti.comImplementationConsiderations

4.6.3ManagingtheSensorControllerandtheAuxiliaryDomainPower

ThesensorcontrollerpowermanagementisindependentofthesystempowermodesinSection3.TheCM3canforceontheauxiliarydomain(whichcontainsthesensorcontroller)toaccessmodulesintheauxiliarydomainortheoscillators.

Thesensorcontrolleriseitheractiveorstandbywhereitexecutescodeorwaitsforevents.Whenthesensorcontrollerisstandingby,itcanwakeupandexecutecodeandre-enterstandbyindependentlyofthesystemstateexcludingshutdown.ThesensorcontrollermaytaketherestofthesystemoutofeitheridleorstandbybyconfiguringAON_EVENT:MCUWUSEL[29:24]tousetheAUX_SWEV1.Whenthe

systemstateisshutdown,thesensorcontrollerisunavailable.ThesensorcontrollerstudiosoftwareusesAON_EVENT:AUXWUSEL[5:0]towakeupthesensorcontrollerfromstandbyusingtheRTC_CH2_DLYevent.

NOTE:Thesensorcontrollerinterfacedriverhandestheseevents.

Table2.SensorController/AuxiliaryPowerManagement

SystemStateActiveIdleStandbyShutdown

AvailableSensorControllerStatesActiveorstandby

Activeorstandby.Sensorcontrollercanwakesystemfromidle.Activeorstandby.SensorcontrollercanwakesystemfromstandbyNotavailable

4.6.4SharingResourcesBetweentheSensorControllerandtheCM3

YoucanaccessseveralresourcesliketheOSC_DIG,theTDC,andADContheCC26xx/CC13xxfromboththesensorcontrollerandtheCM3.Toensuretheseaccessesarecorrectlyarbitratedonthebus,theCM3shouldalwaysaccessthesemodulesthroughdriverlib,whichhasthisarbitrationsupportbuiltin.IftheCM3andthesensorcontrolleraccessthesameresources,protectthemusingtheauxiliary

semaphoremodule.Thismodulehaseightsemaphoresreservedforprotecting-sharedresourcesintheauxiliarydomain.

Theconventionisasfollows:

•SMPH0protectsAdi/Ddibus.ThissemaphoreisbuiltintoCC26xxware/CC13xxwareimplementations.•SMPH1protectstheTDC.Theapplicationenforcesthis.•SMPH2protectstheADC.Theapplicationenforcesthis.

Fordetailsonhowtousetheauxiliarysemaphores,seetheAUX_SMPHregisters.

4.7RTC

TheRTCisclockedfromthelow-frequencyoscillator.TheRTCcangeneratetimedeventstotheCM3andwakethedevicefromidleorstandby.

TheTI-RTOSimplementationisavailableintheTimer.csourcefileintheTI-RTOSinstallation:

C:\i\irtos_simplelink_#_##_##_##\\products\\bios_#_##_##_##\\packages\i\\sysbios\\family\\arm\\cc26xx\\Timer.c

4.7.1InitializingRTC

TheTimer_start(Timer_Object*obj)TI-RTOSfunctioninitializes,resetstheRTC,andconfigureschannel0togenerateinterruptstotheCM3.TheCM3useschannel0becausechannel1isreservedfortheRFcoreandchannel2isreservedforthesensorcontroller.

SWRA486–August2015

SubmitDocumentationFeedback

CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

23

ImplementationConsiderationswww.ti.com

4.7.2ConfiguringRTCCompareEvents

TheTimer_periodicStub(UArgarg)functionclearsapendingRTCinterrupt,setsanewcomparevalue,andcallstheappropriateclocktickfunction.Becarefulwhenconfiguringanewcomparevalueifthenewvalueisnear,becauseclearinganRTCeventtakesprecedenceoversettinganevent.

Implementationsuggestion1(performtheAONsyncafterclearingtheevent):1.Clearapendingevent(AONRTCEventClear(AON_RTC_CH0)).

2.AONsync(SysCtrlAonSync())toensuretheeventisclearedandnolongeractive.

3.Setanewcomparevalue.Ifthenewcomparevalueisnoworupto1secondinthepast,theeventtriggersimmediately.Implementationsuggestion2(TI-RTOSimplementation):

1.Clearapendingevent(AONRTCEventClear(AON_RTC_CH0)).

2.SetanewcomparevalueaddingamarginoffourRTCedges(µs)tothecomparevaluetoensuretheeventclearsbeforethenewcomparevaluegeneratesaninterrupt.

4.8DebuggingThroughPowerModes

Whendebuggingsoftwarethatentersandexitspowermodeswithanemulatorattached,thetimingisslightlydifferentthanwhenrunningwithoutanemulatorattached.Inactivemode,theCPUpowerdomainisalwayson,andthetimingisthesame.Inidle,standby,andshutdown,theCPUpowerdomainremainsonwhenanemulatorisattachedtokeepthedebugsessionactive.Thewakeuptimefromthesepowermodesisshorterthanifanemulatorisnotattachedtothetarget.

4.9UsingPeripherals

PeripheraldriversarepartoftheTI-RTOSinstallation.TheCC26xx/CC13xximplementationisatthefollowingpath:C:\i\irtos_simplelink_#_##_##_##\\packages\i\\drivers

ForgenericperipheralssuchasUART,SPI,andI2C,TI-RTOSprovidesacommonAPIforeasymigrationbetweendifferentTIarchitectures.

TheCC26xx/CC13xxspecificdriversaredocumentedinDoxygenformat.Thisformatexplainshowtousethedrivers.TheCC26xxpower-managementdocumentisdistributedintheTI-RTOSinstallation.PowerManagementforCC26xxSimpleLinkWirelessMCUUser'sGuide(SPRUI20)alsoexplainshowtheTI-RTOSdriversinteractwiththepowermanagementpartofthekernel.

Thefollowingrulesapplywhenusinganyperipheral:

•Onlyuseaperipheralinactiveoridlepowermodes.Instandbyandshutdown,youmustturnofftheperipheralanditspowerdomain.

•Beforeaccessingaperipheral,dothefollowing:

1.Turnonthepowerdomainthatcontainstheperipheral.

2.EnabletherunclockfortheperipheralthroughthePRCMregisters.

•Reconfigureaperipheralbeforeopeningtheinputandoutputlatcheswhenexitingstandbytoavoidinputandoutputglitches.

5References

•••

TI-RTOSdownloadpath:www.ti.com/tool/ti-rtos

PowerManagementforCC26xxSimpleLinkWirelessMCUUser'sGuide(SPRUI20):C:/ti/tirtos_simplelink_#_##_##_##/docs/Power_Management_CC26xx.pdfCC26xxTechnicalReferenceManual(SWCU117)

24CC26xx/CC13xxPowerManagementSoftwareDeveloper's

Copyright©2015,TexasInstrumentsIncorporated

SWRA486–August2015

SubmitDocumentationFeedback

IMPORTANTNOTICE

TexasInstrumentsIncorporatedanditssubsidiaries(TI)reservetherighttomakecorrections,enhancements,improvementsandotherchangestoitssemiconductorproductsandservicesperJESD46,latestissue,andtodiscontinueanyproductorserviceperJESD48,latestissue.Buyersshouldobtainthelatestrelevantinformationbeforeplacingordersandshouldverifythatsuchinformationiscurrentandcomplete.Allsemiconductorproducts(alsoreferredtohereinas“components”)aresoldsubjecttoTI’stermsandconditionsofsalesuppliedatthetimeoforderacknowledgment.

TIwarrantsperformanceofitscomponentstothespecificationsapplicableatthetimeofsale,inaccordancewiththewarrantyinTI’stermsandconditionsofsaleofsemiconductorproducts.TestingandotherqualitycontroltechniquesareusedtotheextentTIdeemsnecessarytosupportthiswarranty.Exceptwheremandatedbyapplicablelaw,testingofallparametersofeachcomponentisnotnecessarilyperformed.

TIassumesnoliabilityforapplicationsassistanceorthedesignofBuyers’products.BuyersareresponsiblefortheirproductsandapplicationsusingTIcomponents.TominimizetherisksassociatedwithBuyers’productsandapplications,Buyersshouldprovideadequatedesignandoperatingsafeguards.

TIdoesnotwarrantorrepresentthatanylicense,eitherexpressorimplied,isgrantedunderanypatentright,copyright,maskworkright,orotherintellectualpropertyrightrelatingtoanycombination,machine,orprocessinwhichTIcomponentsorservicesareused.InformationpublishedbyTIregardingthird-partyproductsorservicesdoesnotconstitutealicensetousesuchproductsorservicesorawarrantyorendorsementthereof.Useofsuchinformationmayrequirealicensefromathirdpartyunderthepatentsorotherintellectualpropertyofthethirdparty,oralicensefromTIunderthepatentsorotherintellectualpropertyofTI.

ReproductionofsignificantportionsofTIinformationinTIdatabooksordatasheetsispermissibleonlyifreproductioniswithoutalterationandisaccompaniedbyallassociatedwarranties,conditions,limitations,andnotices.TIisnotresponsibleorliableforsuchaltereddocumentation.Informationofthirdpartiesmaybesubjecttoadditionalrestrictions.

ResaleofTIcomponentsorserviceswithstatementsdifferentfromorbeyondtheparametersstatedbyTIforthatcomponentorservicevoidsallexpressandanyimpliedwarrantiesfortheassociatedTIcomponentorserviceandisanunfairanddeceptivebusinesspractice.TIisnotresponsibleorliableforanysuchstatements.

Buyeracknowledgesandagreesthatitissolelyresponsibleforcompliancewithalllegal,regulatoryandsafety-relatedrequirements

concerningitsproducts,andanyuseofTIcomponentsinitsapplications,notwithstandinganyapplications-relatedinformationorsupportthatmaybeprovidedbyTI.Buyerrepresentsandagreesthatithasallthenecessaryexpertisetocreateandimplementsafeguardswhichanticipatedangerousconsequencesoffailures,monitorfailuresandtheirconsequences,lessenthelikelihoodoffailuresthatmightcauseharmandtakeappropriateremedialactions.BuyerwillfullyindemnifyTIanditsrepresentativesagainstanydamagesarisingoutoftheuseofanyTIcomponentsinsafety-criticalapplications.

Insomecases,TIcomponentsmaybepromotedspecificallytofacilitatesafety-relatedapplications.Withsuchcomponents,TI’sgoalistohelpenablecustomerstodesignandcreatetheirownend-productsolutionsthatmeetapplicablefunctionalsafetystandardsandrequirements.Nonetheless,suchcomponentsaresubjecttotheseterms.

NoTIcomponentsareauthorizedforuseinFDAClassIII(orsimilarlife-criticalmedicalequipment)unlessauthorizedofficersofthepartieshaveexecutedaspecialagreementspecificallygoverningsuchuse.

OnlythoseTIcomponentswhichTIhasspecificallydesignatedasmilitarygradeor“enhancedplastic”aredesignedandintendedforuseinmilitary/aerospaceapplicationsorenvironments.BuyeracknowledgesandagreesthatanymilitaryoraerospaceuseofTIcomponentswhichhavenotbeensodesignatedissolelyattheBuyer'srisk,andthatBuyerissolelyresponsibleforcompliancewithalllegalandregulatoryrequirementsinconnectionwithsuchuse.

TIhasspecificallydesignatedcertaincomponentsasmeetingISO/TS16949requirements,mainlyforautomotiveuse.Inanycaseofuseofnon-designatedproducts,TIwillnotberesponsibleforanyfailuretomeetISO/TS16949.ProductsAudioAmplifiersDataConvertersDLP®ProductsDSP

ClocksandTimersInterfaceLogicPowerMgmtMicrocontrollersRFID

OMAPApplicationsProcessorsWirelessConnectivity

www.ti.com/audioamplifier.ti.comdataconverter.ti.comwww.dlp.comdsp.ti.comwww.ti.com/clocksinterface.ti.comlogic.ti.compower.ti.commicrocontroller.ti.comwww.ti-rfid.comwww.ti.com/omap

TIE2ECommunity

e2e.ti.com

www.ti.com/wirelessconnectivity

MailingAddress:TexasInstruments,PostOfficeBox655303,Dallas,Texas75265

Copyright©2015,TexasInstrumentsIncorporated

Applications

AutomotiveandTransportationCommunicationsandTelecomComputersandPeripheralsConsumerElectronicsEnergyandLightingIndustrialMedicalSecurity

Space,AvionicsandDefenseVideoandImaging

www.ti.com/automotivewww.ti.com/communicationswww.ti.com/computerswww.ti.com/consumer-appswww.ti.com/energywww.ti.com/industrialwww.ti.com/medicalwww.ti.com/security

www.ti.com/space-avionics-defensewww.ti.com/video

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- gamedaodao.com 版权所有 湘ICP备2022005869号-6

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务