Power Management¶
All power-managment functionality is handled by the TI-RTOS power driver and are used by the peripheral drivers (e.g. UART, SPI, I2C, etc..). Applications can prevent, if they choose, the CC13x0 from entering low power modes by setting a power constraint.
By default, all the examples in SimpleLink CC13x0 SDK will put the CC13x0 in standby mode if there is no task running. This is achieved by configuring the TI power driver and the kernel to do so, as shown in the following step.
In the
.cfg
or.xscfg
, you can find the following setting:/* ================ Idle configuration ================ */ var Idle = xdc.useModule('ti.sysbios.knl.Idle'); /* * The Idle module is used to specify a list of functions to be called when no * other tasks are running in the system. * * Functions added here will be run continuously within the idle task. * * Function signature: * Void func(Void); */ /* Allow power management */ Idle.addFunc('&Power_idleFunc');
By doing this, the TI-RTOS kernel will call Power_idleFunc whenever this is no task running.
Power_idleFunc
takes in policyFxn and policyFxn is defined using SysConfig tool Figure 23.. By default, TI sets thePowerCCxxxx_standbyPolicy
as policyFxn.Power_idleFunc
is defined in{SDK_INSTALL_DIR}\source\ti\drivers\power\PowerCCxxxx.c
andPowerCCxxxx_standbyPolicy
can be found in{SDK_INSTALL_DIR}\kernel\tirtos\packages\ti\dpl\PowerCCxxxx_tirtos.c
In the sysconfig generated files, you will find the following example in ti_drivers_config.c.
1const PowerCC26XX_Config PowerCC26XX_config = { 2 .enablePolicy = true, 3 .policyInitFxn = NULL, 4 .policyFxn = PowerCC26XX_standbyPolicy, 5 .calibrateFxn = PowerCC26XX_calibrate, 6 .calibrateRCOSC_LF = true, 7 .calibrateRCOSC_HF = true, 8 .enableTCXOFxn = NULL 9};
More information on power-management functionality, see Power Management User’s Guide. These APIs are required only when using a custom driver.