TI-RTOS for SimpleLink Wireless MCUs  2.14.02.22
Data Structures | Macros | Typedefs | Enumerations | Functions
PowerCC3200.h File Reference

Detailed Description

Power manager interface for the CC3200.

============================================================================

The Power header file should be included in an application as follows:

Implementation

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:

var Clock = xdc.useModule('ti.sysbios.knl.Clock');
Clock.TimerProxy = xdc.useModule("ti.sysbios.family.arm.cc32xx.Timer");
Clock.tickMode = Clock.TickMode_DYNAMIC;
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
Idle.addFunc('&Power_idleFunc');

#include <stdint.h>
#include <ti/drivers/utils/List.h>
#include <inc/hw_types.h>
#include <driverlib/pin.h>
#include <driverlib/rom_map.h>
Include dependency graph for PowerCC3200.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...
 

Macros

#define PowerCC3200_RESUMETIMEDEEPSLEEP   500
 
#define PowerCC3200_RESUMETIMELPDS   2500
 
#define PowerCC3200_TOTALTIMEDEEPSLEEP   1000
 
#define PowerCC3200_TOTALTIMELPDS   5000
 
#define PowerCC3200_TOTALTIMESHUTDOWN   500000
 
#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
 
#define PowerCC3200_DISALLOW_LPDS   1
 
#define PowerCC3200_DISALLOW_SHUTDOWN   2
 
#define PowerCC3200_NUMCONSTRAINTS   3
 
#define PowerCC3200_ENTERING_DEEPSLEEP   0x1
 
#define PowerCC3200_ENTERING_LPDS   0x2
 
#define PowerCC3200_ENTERING_SHUTDOWN   0x4
 
#define PowerCC3200_AWAKE_DEEPSLEEP   0x8
 
#define PowerCC3200_AWAKE_LPDS   0x10
 
#define PowerCC3200_NUMEVENTS   5
 
#define PowerCC3200_DEEPSLEEP   0x1
 
#define PowerCC3200_LPDS   0x2
 
#define PowerCC3200_numNVICSetEnableRegs   6
 
#define PowerCC3200_numNVICIntPriority   49
 
#define Power_getPerformanceLevel(void)   0
 
#define Power_setPerformanceLevel(level)   Power_EFAIL
 

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...
 

Enumerations

enum  PowerCC3200_ParkState {
  PowerCC3200_NO_PULL_HIZ = PIN_TYPE_STD,
  PowerCC3200_WEAK_PULL_UP_STD = PIN_TYPE_STD_PU,
  PowerCC3200_WEAK_PULL_DOWN_STD = PIN_TYPE_STD_PD,
  PowerCC3200_WEAK_PULL_UP_OPENDRAIN = PIN_TYPE_OD_PU,
  PowerCC3200_WEAK_PULL_DOWN_OPENDRAIN = PIN_TYPE_OD_PD
}
 enumeration of states for parked pins More...
 
enum  PowerCC3200_Pin {
  PowerCC3200_PIN01 = PIN_01,
  PowerCC3200_PIN02 = PIN_02,
  PowerCC3200_PIN03 = PIN_03,
  PowerCC3200_PIN04 = PIN_04,
  PowerCC3200_PIN05 = PIN_05,
  PowerCC3200_PIN06 = PIN_06,
  PowerCC3200_PIN07 = PIN_07,
  PowerCC3200_PIN08 = PIN_08,
  PowerCC3200_PIN11 = PIN_11,
  PowerCC3200_PIN12 = PIN_12,
  PowerCC3200_PIN13 = PIN_13,
  PowerCC3200_PIN14 = PIN_14,
  PowerCC3200_PIN15 = PIN_15,
  PowerCC3200_PIN16 = PIN_16,
  PowerCC3200_PIN17 = PIN_17,
  PowerCC3200_PIN18 = PIN_18,
  PowerCC3200_PIN19 = PIN_19,
  PowerCC3200_PIN20 = PIN_20,
  PowerCC3200_PIN21 = PIN_21,
  PowerCC3200_PIN45 = PIN_45,
  PowerCC3200_PIN50 = PIN_50,
  PowerCC3200_PIN52 = PIN_52,
  PowerCC3200_PIN53 = PIN_53,
  PowerCC3200_PIN55 = PIN_55,
  PowerCC3200_PIN57 = PIN_57,
  PowerCC3200_PIN58 = PIN_58,
  PowerCC3200_PIN59 = PIN_59,
  PowerCC3200_PIN60 = PIN_60,
  PowerCC3200_PIN61 = PIN_61,
  PowerCC3200_PIN62 = PIN_62,
  PowerCC3200_PIN63 = PIN_63,
  PowerCC3200_PIN64 = PIN_64
}
 enumeration of pins that can be parked 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)
 

Macro Definition Documentation

#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 Documentation

Power global configuration.

Internal module state.

NVIC registers that need to be save on entering LPDS.

MCU core registers that need to be save on entering LPDS.

struct of context registers to save on entering LPDS

For wakeup from LPDS or shutdown configuration.

Enumeration Type Documentation

enumeration of states for parked pins

Enumerator
PowerCC3200_NO_PULL_HIZ 
PowerCC3200_WEAK_PULL_UP_STD 
PowerCC3200_WEAK_PULL_DOWN_STD 
PowerCC3200_WEAK_PULL_UP_OPENDRAIN 
PowerCC3200_WEAK_PULL_DOWN_OPENDRAIN 

enumeration of pins that can be parked

Enumerator
PowerCC3200_PIN01 
PowerCC3200_PIN02 
PowerCC3200_PIN03 
PowerCC3200_PIN04 
PowerCC3200_PIN05 
PowerCC3200_PIN06 
PowerCC3200_PIN07 
PowerCC3200_PIN08 
PowerCC3200_PIN11 
PowerCC3200_PIN12 
PowerCC3200_PIN13 
PowerCC3200_PIN14 
PowerCC3200_PIN15 
PowerCC3200_PIN16 
PowerCC3200_PIN17 
PowerCC3200_PIN18 
PowerCC3200_PIN19 
PowerCC3200_PIN20 
PowerCC3200_PIN21 
PowerCC3200_PIN45 
PowerCC3200_PIN50 
PowerCC3200_PIN52 
PowerCC3200_PIN53 
PowerCC3200_PIN55 
PowerCC3200_PIN57 
PowerCC3200_PIN58 
PowerCC3200_PIN59 
PowerCC3200_PIN60 
PowerCC3200_PIN61 
PowerCC3200_PIN62 
PowerCC3200_PIN63 
PowerCC3200_PIN64 

Function Documentation

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.

Parameters
wakeupSettings 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

Copyright 2015, Texas Instruments Incorporated