TI-RTOS Drivers
tidrivers_cc13xx_cc26xx_2_21_00_04
|
Power manager interface for CC26XX.
============================================================================
The Power header file should be included in an application as follows:
Refer to Power.h for a complete description of APIs.
This module defines the power resources, constraints, events, sleep states and transition latency times for CC26XX.
A default power policy is provided which can transition the MCU from the active state to one of the supported power saving states.
#include <ti/sysbios/family/arm/m3/Hwi.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/drivers/Power.h>
Go to the source code of this file.
Data Structures | |
struct | PowerCC26XX_ResourceRecord |
Power resource database record format. More... | |
struct | PowerCC26XX_Config |
Global configuration structure. More... | |
struct | PowerCC26XX_ModuleState |
Internal module state. More... | |
Typedefs | |
typedef uint8_t | PowerCC26XX_Resource |
typedef struct PowerCC26XX_ResourceRecord | PowerCC26XX_ResourceRecord |
Power resource database record format. More... | |
typedef struct PowerCC26XX_Config | PowerCC26XX_Config |
Global configuration structure. More... | |
typedef struct PowerCC26XX_ModuleState | PowerCC26XX_ModuleState |
Internal module state. More... | |
Functions | |
bool | PowerCC26XX_calibrate (unsigned int arg) |
RCOSC calibration. More... | |
void | PowerCC26XX_doWFI (void) |
Wait for interrupt. More... | |
Clock_Handle | PowerCC26XX_getClockHandle (void) |
Get the handle of a Clock object that a power policy can use to schedule wakeups. More... | |
uint32_t | PowerCC26XX_getXoscStartupTime (uint32_t timeUntilWakeupInMs) |
Get the estimated crystal oscillator startup time in microseconds. More... | |
bool | PowerCC26XX_injectCalibration (void) |
Explicitly trigger RCOSC calibration. More... | |
bool | PowerCC26XX_noCalibrate (unsigned int arg) |
Do not perform calibration function. More... | |
void | PowerCC26XX_switchXOSC_HF (void) |
Switch the HF clock source to XOSC_HF. More... | |
void | PowerCC26XX_standbyPolicy (void) |
Power standby policy function. More... | |
#define PowerCC26XX_RESUMETIMESTANDBY 750 |
#define PowerCC26XX_TOTALTIMESTANDBY 1000 |
#define PowerCC26XX_WAKEDELAYSTANDBY 130 |
#define PowerCC26XX_INITIALWAITRCOSC_LF 1000 |
#define PowerCC26XX_RETRYWAITRCOSC_LF 1000 |
#define PowerCC26XX_INITIALWAITXOSC_HF 50 |
#define PowerCC26XX_RETRYWAITXOSC_HF 50 |
#define PowerCC26XX_INITIALWAITXOSC_LF 10000 |
#define PowerCC26XX_RETRYWAITXOSC_LF 5000 |
#define PowerCC26XX_PERIPH_GPT0 0 |
#define PowerCC26XX_PERIPH_GPT1 1 |
#define PowerCC26XX_PERIPH_GPT2 2 |
#define PowerCC26XX_PERIPH_GPT3 3 |
#define PowerCC26XX_PERIPH_SSI0 4 |
#define PowerCC26XX_PERIPH_SSI1 5 |
#define PowerCC26XX_PERIPH_UART0 6 |
#define PowerCC26XX_PERIPH_I2C0 7 |
#define PowerCC26XX_PERIPH_TRNG 8 |
#define PowerCC26XX_PERIPH_GPIO 9 |
#define PowerCC26XX_PERIPH_UDMA 10 |
#define PowerCC26XX_PERIPH_CRYPTO 11 |
#define PowerCC26XX_PERIPH_I2S 12 |
#define PowerCC26XX_PERIPH_RFCORE 13 |
#define PowerCC26XX_XOSC_HF 14 |
#define PowerCC26XX_DOMAIN_PERIPH 15 |
#define PowerCC26XX_DOMAIN_SERIAL 16 |
#define PowerCC26XX_DOMAIN_RFCORE 17 |
#define PowerCC26XX_DOMAIN_SYSBUS 18 |
#define PowerCC26XX_NUMRESOURCES 19 |
#define PowerCC26XX_PERIPH 0x80 |
#define PowerCC26XX_SPECIAL 0x40 |
#define PowerCC26XX_DOMAIN 0x00 |
#define PowerCC26XX_PARENTMASK 0x3F |
#define PowerCC26XX_NOPARENT 0x3F |
#define PowerCC26XX_STANDBY 0x1 |
#define PowerCC26XX_ENABLE 1 |
#define PowerCC26XX_DISABLE 0 |
#define PowerCC26XX_SB_VIMS_CACHE_RETAIN 0 |
#define PowerCC26XX_SD_DISALLOW 1 |
#define PowerCC26XX_SB_DISALLOW 2 |
#define PowerCC26XX_IDLE_PD_DISALLOW 3 |
#define PowerCC26XX_NEED_FLASH_IN_IDLE 4 |
#define PowerCC26XX_NUMCONSTRAINTS 5 |
#define PowerCC26XX_ENTERING_STANDBY 0x1 |
#define PowerCC26XX_ENTERING_SHUTDOWN 0x2 |
#define PowerCC26XX_AWAKE_STANDBY 0x4 |
#define PowerCC26XX_AWAKE_STANDBY_LATE 0x8 |
#define PowerCC26XX_XOSC_HF_SWITCHED 0x10 |
#define PowerCC26XX_NUMEVENTS 5 |
#define PowerCC26XX_SETUP_CALIBRATE 1 |
#define PowerCC26XX_INITIATE_CALIBRATE 2 |
#define PowerCC26XX_DO_CALIBRATE 3 |
typedef uint8_t PowerCC26XX_Resource |
typedef struct PowerCC26XX_ResourceRecord PowerCC26XX_ResourceRecord |
Power resource database record format.
typedef struct PowerCC26XX_Config PowerCC26XX_Config |
Global configuration structure.
typedef struct PowerCC26XX_ModuleState PowerCC26XX_ModuleState |
Internal module state.
bool PowerCC26XX_calibrate | ( | unsigned int | arg | ) |
RCOSC calibration.
If this function is plugged into the PowerCC26XX_Config structure 'calibrateFxn' field, RCOSC calibration is performed.
arg | used internally |
void PowerCC26XX_doWFI | ( | void | ) |
Wait for interrupt.
This function executes a Wait-For-Interrupt instruction. This can be used to set the PowerCC26XX_Config field 'policyFxn'.
Clock_Handle PowerCC26XX_getClockHandle | ( | void | ) |
Get the handle of a Clock object that a power policy can use to schedule wakeups.
uint32_t PowerCC26XX_getXoscStartupTime | ( | uint32_t | timeUntilWakeupInMs | ) |
Get the estimated crystal oscillator startup time in microseconds.
timeUntilWakeupInMs | The estimated time until the next wakeup event, in units of milliseconds |
bool PowerCC26XX_injectCalibration | ( | void | ) |
Explicitly trigger RCOSC calibration.
bool PowerCC26XX_noCalibrate | ( | unsigned int | arg | ) |
Do not perform calibration function.
If this function is plugged into the PowerCC26XX_Config structure 'calibrateFxn' field, no calibration is performed.
arg | used internally |
void PowerCC26XX_switchXOSC_HF | ( | void | ) |
Switch the HF clock source to XOSC_HF.
void PowerCC26XX_standbyPolicy | ( | void | ) |
Power standby policy function.
This policy will transition the device into the PowerCC26XX_STANDBY sleep state during CPU idle time. This is an agressive power policy function that will consider active constraints, sleep transition latencies, and the next expected wakeup, and automatically transition the device into the deepest sleep state possible.
The first goal is to enter PowerCC26XX_STANDBY; if that is not appropriate given current conditions (e.g., the sleep transition latency is greater greater than the time until the next scheduled Clock event), then the secondary goal is the IDLE_PD state; if that is disallowed (e.g., if the Power_IDLE_PD_DISALLOW constraint is declared), then the policy will fallback and simply invoke wait-for-interrupt, to clock gate the CPU until the next interrupt.
In order for this power policy to run, it must be set to the 'policyFxn' field in the PowerCC26XX_Config structure, and either the 'enablePolicy' field in the PowerCC26XX_Config structure must be set or Power_enablePolicy() must be called at runtime.