Data Structures | Macros | Enumerations | Functions
PowerWFF3.h File Reference

Detailed Description

Power manager interface for WFF3 devices.

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

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

Refer to Power.h for a complete description of APIs.

Implementation

This header file defines the power resources, constraints, events, sleep states and transition latencies for WFF3 devices.


#include <ti/drivers/dpl/HwiP.h>
#include <ti/drivers/dpl/ClockP.h>
#include <ti/drivers/Power.h>
#include <ti/devices/DeviceFamily.h>
Include dependency graph for PowerWFF3.h:

Go to the source code of this file.

Data Structures

struct  PowerWFF3_Config
 Global configuration structure. More...
 

Macros

#define PowerWFF3_RESUMETIMESLEEP   15000
 
#define PowerWFF3_TOTALTIMESLEEP   16000
 
#define PowerWFF3_WAKEDELAYSLEEP   15000
 
#define PowerWFF3_PERIPH_DCAN   0
 
#define PowerWFF3_PERIPH_GPTIMER0   1
 
#define PowerWFF3_PERIPH_GPTIMER1   2
 
#define PowerWFF3_PERIPH_I2C0   3
 
#define PowerWFF3_PERIPH_I2C1   4
 
#define PowerWFF3_PERIPH_I2S   5
 
#define PowerWFF3_PERIPH_SDMMC   6
 
#define PowerWFF3_PERIPH_SPI0   7
 
#define PowerWFF3_PERIPH_SPI1   8
 
#define PowerWFF3_PERIPH_SYSTIMER   9
 
#define PowerWFF3_PERIPH_UARTLIN0   10
 
#define PowerWFF3_PERIPH_UARTLIN1   11
 
#define PowerWFF3_PERIPH_SDIO   12
 
#define PowerWFF3_PERIPH_ADC0   13
 
#define PowerWFF3_PERIPH_UARTLIN2   14
 
#define PowerWFF3_SLEEP   0x1
 
#define PowerWFF3_DISALLOW_SHUTDOWN   0
 
#define PowerWFF3_DISALLOW_SLEEP   1
 
#define PowerWFF3_DISALLOW_IDLE   2
 
#define PowerWFF3_ENTERING_SLEEP   (1 << 0)
 
#define PowerWFF3_ENTERING_SHUTDOWN   (1 << 1)
 
#define PowerWFF3_AWAKE_SLEEP   (1 << 2)
 

Enumerations

enum  PowerWFF3_ResetReason { PowerWFF3_RESET_PIN = 0, PowerWFF3_RESET_POR = 1 }
 Reasons the device has booted or rebooted. More...
 

Functions

void PowerWFF3_doWFI (void)
 The wait for interrupt (WFI) policy. More...
 
static PowerWFF3_ResetReason PowerWFF3_getResetReason (void)
 Returns the reason for the most recent reset or wakeup. More...
 
void PowerWFF3_sleepPolicy (void)
 The SLEEP Power Policy. More...
 
void PowerWFF3_schedulerDisable (void)
 
void PowerWFF3_schedulerRestore (void)
 

Macro Definition Documentation

§ PowerWFF3_RESUMETIMESLEEP

#define PowerWFF3_RESUMETIMESLEEP   15000

The latency to reserve for resume from Sleep (usec)

§ PowerWFF3_TOTALTIMESLEEP

#define PowerWFF3_TOTALTIMESLEEP   16000

The total latency to reserve for entry to and exit from Sleep (usec)

§ PowerWFF3_WAKEDELAYSLEEP

#define PowerWFF3_WAKEDELAYSLEEP   15000

The initial delay when waking from Sleep (usec)

§ PowerWFF3_PERIPH_DCAN

#define PowerWFF3_PERIPH_DCAN   0

Resource ID: DCAN

§ PowerWFF3_PERIPH_GPTIMER0

#define PowerWFF3_PERIPH_GPTIMER0   1

Resource ID: GPTIMER 0

§ PowerWFF3_PERIPH_GPTIMER1

#define PowerWFF3_PERIPH_GPTIMER1   2

Resource ID: GPTIMER 1

§ PowerWFF3_PERIPH_I2C0

#define PowerWFF3_PERIPH_I2C0   3

Resource ID: I2C 0

§ PowerWFF3_PERIPH_I2C1

#define PowerWFF3_PERIPH_I2C1   4

Resource ID: I2C 1

§ PowerWFF3_PERIPH_I2S

#define PowerWFF3_PERIPH_I2S   5

Resource ID: I2S

§ PowerWFF3_PERIPH_SDMMC

#define PowerWFF3_PERIPH_SDMMC   6

Resource ID: SDMMC

§ PowerWFF3_PERIPH_SPI0

#define PowerWFF3_PERIPH_SPI0   7

Resource ID: SPI 0

§ PowerWFF3_PERIPH_SPI1

#define PowerWFF3_PERIPH_SPI1   8

Resource ID: SPI 1

§ PowerWFF3_PERIPH_SYSTIMER

#define PowerWFF3_PERIPH_SYSTIMER   9

Resource ID: SysTimer

§ PowerWFF3_PERIPH_UARTLIN0

#define PowerWFF3_PERIPH_UARTLIN0   10

Resource ID: UARTLIN 0

§ PowerWFF3_PERIPH_UARTLIN1

#define PowerWFF3_PERIPH_UARTLIN1   11

Resource ID: UARTLIN 1

§ PowerWFF3_PERIPH_SDIO

#define PowerWFF3_PERIPH_SDIO   12

Resource ID: SDIO

§ PowerWFF3_PERIPH_ADC0

#define PowerWFF3_PERIPH_ADC0   13

Resource ID: ADC

§ PowerWFF3_PERIPH_UARTLIN2

#define PowerWFF3_PERIPH_UARTLIN2   14

Resource ID: UARTLIN 2

§ PowerWFF3_SLEEP

#define PowerWFF3_SLEEP   0x1

The SLEEP state

§ PowerWFF3_DISALLOW_SHUTDOWN

#define PowerWFF3_DISALLOW_SHUTDOWN   0

Constraint: Disallow a transition to the SHUTDOWN state

§ PowerWFF3_DISALLOW_SLEEP

#define PowerWFF3_DISALLOW_SLEEP   1

Constraint: Disallow a transition to the SLEEP state

§ PowerWFF3_DISALLOW_IDLE

#define PowerWFF3_DISALLOW_IDLE   2

Constraint: Disallow a transition to the IDLE state

§ PowerWFF3_ENTERING_SLEEP

#define PowerWFF3_ENTERING_SLEEP   (1 << 0)

Power event: The device is entering the SLEEP state

§ PowerWFF3_ENTERING_SHUTDOWN

#define PowerWFF3_ENTERING_SHUTDOWN   (1 << 1)

Power event: The device is entering the SHUTDOWN state

§ PowerWFF3_AWAKE_SLEEP

#define PowerWFF3_AWAKE_SLEEP   (1 << 2)

Power event: The device is waking up from the SLEEP state

Enumeration Type Documentation

§ PowerWFF3_ResetReason

Reasons the device has booted or rebooted.

Enumerator
PowerWFF3_RESET_PIN 

Device reset due to pin reset

PowerWFF3_RESET_POR 

Device booted due to power on reset

Function Documentation

§ PowerWFF3_doWFI()

void PowerWFF3_doWFI ( void  )

The wait for interrupt (WFI) policy.

This is a lightweight Power Policy which simply invokes CPU wait for interrupt.

This policy can be selected statically via the policyFxn pointer in the PowerWFF3_Config structure, or dynamically at runtime, via Power_setPolicy().

§ PowerWFF3_getResetReason()

static PowerWFF3_ResetReason PowerWFF3_getResetReason ( void  )
inlinestatic

Returns the reason for the most recent reset or wakeup.

Returns
PowerWFF3_ResetReason
Precondition
Power_shutdown()
Postcondition
PowerWFF3_releaseLatches()

References PowerWFF3_RESET_PIN, PowerWFF3_schedulerDisable(), PowerWFF3_schedulerRestore(), and PowerWFF3_sleepPolicy().

§ PowerWFF3_sleepPolicy()

void PowerWFF3_sleepPolicy ( void  )

The SLEEP Power Policy.

This is an aggressive Power Policy, which considers active constraints, SLEEP state transition latencies, and time until the next scheduled work, and automatically transitions the device into the lowest power state possible.

The first goal is to enter SLEEP; 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 state; if that is disallowed (e.g., if the PowerWFF3_DISALLOW_IDLE constraint is declared), then the policy will fallback and simply invoke WFI, to clock gate the CPU until the next interrupt.

In order for this policy to run, it must be selected as the Power Policy (either by being specified as the 'policyFxn' in the PowerWFF3_Config structure, or specified at runtime with Power_setPolicy()), and the Power Policy must be enabled (either via 'enablePolicy' in the PowerWFF3_Config structure, or via a call to Power_enablePolicy() at runtime).

Referenced by PowerWFF3_getResetReason().

§ PowerWFF3_schedulerDisable()

void PowerWFF3_schedulerDisable ( void  )

§ PowerWFF3_schedulerRestore()

void PowerWFF3_schedulerRestore ( void  )
© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale