TI-RTOS for SimpleLink Wireless MCUs
2.14.01.20
|
Power manager interface for the CC3200.
============================================================================
The Power header file should be included in an application as follows:
This module defines the power resources, constraints, events, sleep states and transition latency times for CC3200.
A default power policy is provided which can transition the MCU from the active state to one of three sleep states (LPDS, DeepSleep, or Sleep). The default policy looks at the amount of idle time remaining to determine which sleep state it can transition to. It first checks for a tranistion into LPDS. If it cannot transition into LPDS (e.g., not enough time, or a constraint has been set prohibiting LPDS), it next checks for a transition into DeepSleep mode. If it cannot transition into DeepSleep, then it goes into Sleep mode.
The function 'Power_idleFunc' needs to be added to the application's idle loop.
For a TI-RTOS application, the Clock module must be using the RTC timer. This timer can be selected using the following statements in the application configuration (*.cfg) file:
#include <stdint.h>
#include <ti/drivers/utils/List.h>
#include <inc/hw_types.h>
#include <driverlib/pin.h>
#include <driverlib/rom_map.h>
Go to the source code of this file.
Data Structures | |
struct | PowerCC3200_Config |
Power global configuration. More... | |
struct | PowerCC3200_ModuleState |
Internal module state. More... | |
struct | PowerCC3200_NVICRegisters |
NVIC registers that need to be save on entering LPDS. More... | |
struct | PowerCC3200_MCURegisters |
MCU core registers that need to be save on entering LPDS. More... | |
struct | PowerCC3200_SaveRegisters |
struct of context registers to save on entering LPDS More... | |
struct | PowerCC3200_Wakeup |
For wakeup from LPDS or shutdown configuration. More... | |
Typedefs | |
typedef struct PowerCC3200_Config | PowerCC3200_Config |
Power global configuration. More... | |
typedef struct PowerCC3200_ModuleState | PowerCC3200_ModuleState |
Internal module state. More... | |
typedef struct PowerCC3200_NVICRegisters | PowerCC3200_NVICRegisters |
NVIC registers that need to be save on entering LPDS. More... | |
typedef struct PowerCC3200_MCURegisters | PowerCC3200_MCURegisters |
MCU core registers that need to be save on entering LPDS. More... | |
typedef struct PowerCC3200_SaveRegisters | PowerCC3200_SaveRegisters |
struct of context registers to save on entering LPDS More... | |
typedef struct PowerCC3200_Wakeup | PowerCC3200_Wakeup |
For wakeup from LPDS or shutdown configuration. More... | |
Functions | |
void | PowerCC3200_configureWakeup (PowerCC3200_Wakeup *wakeup) |
Function configures wakeup for LPDS and shutdown. More... | |
void | PowerCC3200_initPolicy (void) |
void | PowerCC3200_parkPin (PowerCC3200_Pin pin, PowerCC3200_ParkState parkState) |
void | PowerCC3200_sleepPolicy (void) |
#define PowerCC3200_RESUMETIMEDEEPSLEEP 500 |
latency time for resuming from DeepSleep in microseconds
#define PowerCC3200_RESUMETIMELPDS 2500 |
latency time for resuming from LPDS in microseconds
#define PowerCC3200_TOTALTIMEDEEPSLEEP 1000 |
total latency time for DeepSleep in microseconds
#define PowerCC3200_TOTALTIMELPDS 5000 |
total latency time for LPDS in microseconds
#define PowerCC3200_TOTALTIMESHUTDOWN 500000 |
total latency time for Shutdown in microseconds
#define PowerCC3200_PERIPH_CAMERA 0 |
#define PowerCC3200_PERIPH_I2S 1 |
#define PowerCC3200_PERIPH_SDHOST 2 |
#define PowerCC3200_PERIPH_GSPI 3 |
#define PowerCC3200_PERIPH_LSPI 4 |
#define PowerCC3200_PERIPH_UDMA 5 |
#define PowerCC3200_PERIPH_GPIOA0 6 |
#define PowerCC3200_PERIPH_GPIOA1 7 |
#define PowerCC3200_PERIPH_GPIOA2 8 |
#define PowerCC3200_PERIPH_GPIOA3 9 |
#define PowerCC3200_PERIPH_GPIOA4 10 |
#define PowerCC3200_PERIPH_WDT 11 |
#define PowerCC3200_PERIPH_UARTA0 12 |
#define PowerCC3200_PERIPH_UARTA1 13 |
#define PowerCC3200_PERIPH_TIMERA0 14 |
#define PowerCC3200_PERIPH_TIMERA1 15 |
#define PowerCC3200_PERIPH_TIMERA2 16 |
#define PowerCC3200_PERIPH_TIMERA3 17 |
#define PowerCC3200_PERIPH_DTHE 18 |
#define PowerCC3200_PERIPH_SSPI 19 |
#define PowerCC3200_PERIPH_I2CA0 20 |
#define PowerCC3200_NUMRESOURCES 21 |
#define PowerCC3200_DISALLOW_DEEPSLEEP 0 |
disallow entering DeepSleep
#define PowerCC3200_DISALLOW_LPDS 1 |
disallow entering LPDS
#define PowerCC3200_DISALLOW_SHUTDOWN 2 |
disallow shutdown
#define PowerCC3200_NUMCONSTRAINTS 3 |
number of constraints
#define PowerCC3200_ENTERING_DEEPSLEEP 0x1 |
entering DeepSleep event
#define PowerCC3200_ENTERING_LPDS 0x2 |
entering LPDS event
#define PowerCC3200_ENTERING_SHUTDOWN 0x4 |
entering Shutdown event
#define PowerCC3200_AWAKE_DEEPSLEEP 0x8 |
awake from DeepSleep event
#define PowerCC3200_AWAKE_LPDS 0x10 |
awake from LPDS event
#define PowerCC3200_NUMEVENTS 5 |
number of events
#define PowerCC3200_DEEPSLEEP 0x1 |
DeepSleep state
#define PowerCC3200_LPDS 0x2 |
LPDS state
#define PowerCC3200_numNVICSetEnableRegs 6 |
#define PowerCC3200_numNVICIntPriority 49 |
#define Power_getPerformanceLevel | ( | void | ) | 0 |
#define Power_setPerformanceLevel | ( | level | ) | Power_EFAIL |
typedef struct PowerCC3200_Config PowerCC3200_Config |
Power global configuration.
typedef struct PowerCC3200_ModuleState PowerCC3200_ModuleState |
Internal module state.
typedef struct PowerCC3200_NVICRegisters PowerCC3200_NVICRegisters |
NVIC registers that need to be save on entering LPDS.
typedef struct PowerCC3200_MCURegisters PowerCC3200_MCURegisters |
MCU core registers that need to be save on entering LPDS.
typedef struct PowerCC3200_SaveRegisters PowerCC3200_SaveRegisters |
struct of context registers to save on entering LPDS
typedef struct PowerCC3200_Wakeup PowerCC3200_Wakeup |
For wakeup from LPDS or shutdown configuration.
enum PowerCC3200_Pin |
enumeration of pins that can be parked
void PowerCC3200_configureWakeup | ( | PowerCC3200_Wakeup * | wakeup | ) |
Function configures wakeup for LPDS and shutdown.
This function allows the app to configure the GPIO source and type for waking up from LPDS and shutdown and the network host as a wakeup source for LPDS. This overwrites any previous wakeup settings.
wakeup | Settings applied to wakeup configuration |
void PowerCC3200_initPolicy | ( | void | ) |
OS specific default power policy init function
void PowerCC3200_parkPin | ( | PowerCC3200_Pin | pin, |
PowerCC3200_ParkState | parkState | ||
) |
CC3200 specific pin parking function
void PowerCC3200_sleepPolicy | ( | void | ) |
OS specific default power policy function