![]() |
![]() |
TI-RTOS Drivers
tidrivers_full_2_20_01_10
|
Power manager interface for the CC3200.
============================================================================
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 CC3200.
A default power policy is provided which can transition the MCU from the active state to one of two sleep states (LPDS 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 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 <ti/drivers/Power.h>
#include <inc/hw_types.h>
#include <driverlib/pin.h>
#include <driverlib/rom.h>
#include <driverlib/rom_map.h>
Go to the source code of this file.
Data Structures | |
struct | PowerCC3200_ParkInfo |
Used to specify parking of a pin during LPDS. More... | |
struct | PowerCC3200_ConfigV1 |
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_ParkInfo | PowerCC3200_ParkInfo |
Used to specify parking of a pin during LPDS. More... | |
typedef struct PowerCC3200_ConfigV1 | PowerCC3200_ConfigV1 |
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_setParkState (PowerCC3200_Pin pin, uint32_t level) |
void | PowerCC3200_disableIORetention (unsigned long groupFlags) |
Function to disable IO retention and unlock pin groups following exit from Shutdown. More... | |
void | PowerCC3200_sleepPolicy (void) |
#define PowerCC3200_RESUMETIMELPDS 2500 |
latency time for resuming from LPDS in microseconds
#define PowerCC3200_TOTALTIMELPDS 20000 |
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_LPDS 0 |
disallow entering LPDS
#define PowerCC3200_DISALLOW_SHUTDOWN 1 |
disallow shutdown
#define PowerCC3200_NUMCONSTRAINTS 2 |
number of constraints
#define PowerCC3200_ENTERING_LPDS 0x1 |
entering LPDS event
#define PowerCC3200_ENTERING_SHUTDOWN 0x2 |
entering Shutdown event
#define PowerCC3200_AWAKE_LPDS 0x4 |
awake from LPDS event
#define PowerCC3200_NUMEVENTS 3 |
number of events
#define PowerCC3200_LPDS 0x1 |
LPDS state
#define PowerCC3200_numNVICSetEnableRegs 6 |
#define PowerCC3200_numNVICIntPriority 49 |
#define PowerCC3200_NUMPINS 34 |
#define Power_getPerformanceLevel | ( | void | ) | 0 |
#define Power_setPerformanceLevel | ( | level | ) | Power_EFAIL |
typedef struct PowerCC3200_ParkInfo PowerCC3200_ParkInfo |
Used to specify parking of a pin during LPDS.
typedef struct PowerCC3200_ConfigV1 PowerCC3200_ConfigV1 |
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_setParkState | ( | PowerCC3200_Pin | pin, |
uint32_t | level | ||
) |
CC3200-specific function to dynamically set the LPDS park state for a pin
void PowerCC3200_disableIORetention | ( | unsigned long | groupFlags | ) |
Function to disable IO retention and unlock pin groups following exit from Shutdown.
PowerCC3200_ConfigV1.ioRetentionShutdown can be used to specify locking and retention of pin groups during Shutdown. Upon exit from Shutdown, and when appropriate, an application can call this function, to correspondingly disable IO retention, and unlock the specified pin groups.
groupFlags | A logical OR of one or more of the following flags (defined in driverlib/prcm.h): PRCM_IO_RET_GRP_0 - all pins except sFlash and JTAG interface PRCM_IO_RET_GRP_1 - sFlash interface pins 11,12,13,14 PRCM_IO_RET_GRP_2 - JTAG TDI and TDO interface pins 16,17 PRCM_IO_RET_GRP_3 - JTAG TCK and TMS interface pins 19,20 |
void PowerCC3200_sleepPolicy | ( | void | ) |
OS specific default power policy function