Data Structures | Macros | Functions
PowerMSP432.h File Reference

Detailed Description

Power Driver interface for the MSP432P4.


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

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

#include <stdint.h>
#include <ti/drivers/utils/List.h>
#include <ti/drivers/Power.h>
Include dependency graph for PowerMSP432.h:

Go to the source code of this file.

Data Structures

struct  PowerMSP432_PerfLevel
 Structure defining a performance level. More...
 
struct  PowerMSP432_Freqs
 Structure holding device frequencies (in Hz) More...
 
struct  PowerMSP432_ConfigV1
 Power global configuration (MSP432-specific) More...
 

Macros

#define PowerMSP432_RESUMETIMESLEEP   32
 
#define PowerMSP432_TOTALTIMESLEEP   40
 
#define PowerMSP432_RESUMETIMEDEEPSLEEP_0   16
 
#define PowerMSP432_TOTALTIMEDEEPSLEEP_0   40
 
#define PowerMSP432_RESUMETIMEDEEPSLEEP_1   16
 
#define PowerMSP432_TOTALTIMEDEEPSLEEP_1   40
 
#define PowerMSP432_PERIPH_ADC14   0
 
#define PowerMSP432_PERIPH_DMA   1
 
#define PowerMSP432_PERIPH_EUSCI_A0   2
 
#define PowerMSP432_PERIPH_EUSCI_A1   3
 
#define PowerMSP432_PERIPH_EUSCI_A2   4
 
#define PowerMSP432_PERIPH_EUSCI_A3   5
 
#define PowerMSP432_PERIPH_EUSCI_B0   6
 
#define PowerMSP432_PERIPH_EUSCI_B1   7
 
#define PowerMSP432_PERIPH_EUSCI_B2   8
 
#define PowerMSP432_PERIPH_EUSCI_B3   9
 
#define PowerMSP432_PERIPH_TIMER_A0   10
 
#define PowerMSP432_PERIPH_TIMER_A1   11
 
#define PowerMSP432_PERIPH_TIMER_A2   12
 
#define PowerMSP432_PERIPH_TIMER_A3   13
 
#define PowerMSP432_PERIPH_TIMER_T32   14
 
#define PowerMSP432_DISALLOW_SLEEP   0
 
#define PowerMSP432_DISALLOW_DEEPSLEEP_0   1
 
#define PowerMSP432_DISALLOW_DEEPSLEEP_1   2
 
#define PowerMSP432_DISALLOW_SHUTDOWN_0   3
 
#define PowerMSP432_DISALLOW_SHUTDOWN_1   4
 
#define PowerMSP432_DISALLOW_PERFLEVEL_0   5
 
#define PowerMSP432_DISALLOW_PERFLEVEL_1   6
 
#define PowerMSP432_DISALLOW_PERFLEVEL_2   7
 
#define PowerMSP432_DISALLOW_PERFLEVEL_3   8
 
#define PowerMSP432_DISALLOW_PERFLEVEL_4   9
 
#define PowerMSP432_DISALLOW_PERFLEVEL_5   10
 
#define PowerMSP432_DISALLOW_PERFLEVEL_6   11
 
#define PowerMSP432_DISALLOW_PERFLEVEL_7   12
 
#define PowerMSP432_DISALLOW_PERF_CHANGES   13
 
#define PowerMSP432_ENTERING_SLEEP   0x1
 
#define PowerMSP432_ENTERING_DEEPSLEEP   0x2
 
#define PowerMSP432_ENTERING_SHUTDOWN   0x4
 
#define PowerMSP432_AWAKE_SLEEP   0x8
 
#define PowerMSP432_AWAKE_DEEPSLEEP   0x10
 
#define PowerMSP432_START_CHANGE_PERF_LEVEL   0x20
 
#define PowerMSP432_DONE_CHANGE_PERF_LEVEL   0x40
 
#define PowerMSP432_SLEEP   0x1
 
#define PowerMSP432_DEEPSLEEP_0   0x2
 
#define PowerMSP432_DEEPSLEEP_1   0x4
 
#define PowerMSP432_SHUTDOWN_0   0x0
 
#define PowerMSP432_SHUTDOWN_1   0x1
 
#define CS_DCO_TUNE_FREQ   0x7
 

Functions

void PowerMSP432_initPolicy (void)
 The Power Policy initialization function. More...
 
void PowerMSP432_sleepPolicy (void)
 The SLEEP Power Policy. More...
 
void PowerMSP432_deepSleepPolicy (void)
 The DEEPSLEEP Power Policy. More...
 

Macro Definition Documentation

§ PowerMSP432_RESUMETIMESLEEP

#define PowerMSP432_RESUMETIMESLEEP   32

The latency to reserve for resume from SLEEP (usec)

§ PowerMSP432_TOTALTIMESLEEP

#define PowerMSP432_TOTALTIMESLEEP   40

The total latency to reserve for entry and exit of SLEEP (usec)

§ PowerMSP432_RESUMETIMEDEEPSLEEP_0

#define PowerMSP432_RESUMETIMEDEEPSLEEP_0   16

The latency to reserve for resume from DEEPSLEEP_0 (usec)

§ PowerMSP432_TOTALTIMEDEEPSLEEP_0

#define PowerMSP432_TOTALTIMEDEEPSLEEP_0   40

The total latency to reserve for entry and exit of DEEPSLEEP_0 (usec)

§ PowerMSP432_RESUMETIMEDEEPSLEEP_1

#define PowerMSP432_RESUMETIMEDEEPSLEEP_1   16

The latency to reserve for resume from DEEPSLEEP_1 (usec)

§ PowerMSP432_TOTALTIMEDEEPSLEEP_1

#define PowerMSP432_TOTALTIMEDEEPSLEEP_1   40

The total latency to reserve for entry and exit of DEEPSLEEP_1 (usec)

§ PowerMSP432_PERIPH_ADC14

#define PowerMSP432_PERIPH_ADC14   0

Resource ID: ADC14

§ PowerMSP432_PERIPH_DMA

#define PowerMSP432_PERIPH_DMA   1

Resource ID: DMA

§ PowerMSP432_PERIPH_EUSCI_A0

#define PowerMSP432_PERIPH_EUSCI_A0   2

Resource ID: EUSCI_A0

§ PowerMSP432_PERIPH_EUSCI_A1

#define PowerMSP432_PERIPH_EUSCI_A1   3

Resource ID: EUSCI_A1

§ PowerMSP432_PERIPH_EUSCI_A2

#define PowerMSP432_PERIPH_EUSCI_A2   4

Resource ID: EUSCI_A2

§ PowerMSP432_PERIPH_EUSCI_A3

#define PowerMSP432_PERIPH_EUSCI_A3   5

Resource ID: EUSCI_A3

§ PowerMSP432_PERIPH_EUSCI_B0

#define PowerMSP432_PERIPH_EUSCI_B0   6

Resource ID: EUSCI_B0

§ PowerMSP432_PERIPH_EUSCI_B1

#define PowerMSP432_PERIPH_EUSCI_B1   7

Resource ID: EUSCI_B1

§ PowerMSP432_PERIPH_EUSCI_B2

#define PowerMSP432_PERIPH_EUSCI_B2   8

Resource ID: EUSCI_B2

§ PowerMSP432_PERIPH_EUSCI_B3

#define PowerMSP432_PERIPH_EUSCI_B3   9

Resource ID: EUSCI_B3

§ PowerMSP432_PERIPH_TIMER_A0

#define PowerMSP432_PERIPH_TIMER_A0   10

Resource ID: Timer_A0

§ PowerMSP432_PERIPH_TIMER_A1

#define PowerMSP432_PERIPH_TIMER_A1   11

Resource ID: Timer_A1

§ PowerMSP432_PERIPH_TIMER_A2

#define PowerMSP432_PERIPH_TIMER_A2   12

Resource ID: Timer_A2

§ PowerMSP432_PERIPH_TIMER_A3

#define PowerMSP432_PERIPH_TIMER_A3   13

Resource ID: Timer_A3

§ PowerMSP432_PERIPH_TIMER_T32

#define PowerMSP432_PERIPH_TIMER_T32   14

Resource ID: Timer32

§ PowerMSP432_DISALLOW_SLEEP

#define PowerMSP432_DISALLOW_SLEEP   0

Constraint: Disallow a transition to the SLEEP state

§ PowerMSP432_DISALLOW_DEEPSLEEP_0

#define PowerMSP432_DISALLOW_DEEPSLEEP_0   1

Constraint: Disallow a transition to the DEEPSLEEP_0 state

§ PowerMSP432_DISALLOW_DEEPSLEEP_1

#define PowerMSP432_DISALLOW_DEEPSLEEP_1   2

Constraint: Disallow a transition to the DEEPSLEEP_1 state

§ PowerMSP432_DISALLOW_SHUTDOWN_0

#define PowerMSP432_DISALLOW_SHUTDOWN_0   3

Constraint: Disallow a transition to the SHUTDOWN_0 state

§ PowerMSP432_DISALLOW_SHUTDOWN_1

#define PowerMSP432_DISALLOW_SHUTDOWN_1   4

Constraint: Disallow a transition to the SHUTDOWN_1 state

§ PowerMSP432_DISALLOW_PERFLEVEL_0

#define PowerMSP432_DISALLOW_PERFLEVEL_0   5

Constraint: Disallow a transition to PERFLEVEL_0

§ PowerMSP432_DISALLOW_PERFLEVEL_1

#define PowerMSP432_DISALLOW_PERFLEVEL_1   6

Constraint: Disallow a transition to PERFLEVEL_1

§ PowerMSP432_DISALLOW_PERFLEVEL_2

#define PowerMSP432_DISALLOW_PERFLEVEL_2   7

Constraint: Disallow a transition to PERFLEVEL_2

§ PowerMSP432_DISALLOW_PERFLEVEL_3

#define PowerMSP432_DISALLOW_PERFLEVEL_3   8

Constraint: Disallow a transition to PERFLEVEL_3

§ PowerMSP432_DISALLOW_PERFLEVEL_4

#define PowerMSP432_DISALLOW_PERFLEVEL_4   9

Constraint: Disallow a transition to PERFLEVEL_4

§ PowerMSP432_DISALLOW_PERFLEVEL_5

#define PowerMSP432_DISALLOW_PERFLEVEL_5   10

Constraint: Disallow a transition to PERFLEVEL_5

§ PowerMSP432_DISALLOW_PERFLEVEL_6

#define PowerMSP432_DISALLOW_PERFLEVEL_6   11

Constraint: Disallow a transition to PERFLEVEL_6

§ PowerMSP432_DISALLOW_PERFLEVEL_7

#define PowerMSP432_DISALLOW_PERFLEVEL_7   12

Constraint: Disallow a transition to PERFLEVEL_7

§ PowerMSP432_DISALLOW_PERF_CHANGES

#define PowerMSP432_DISALLOW_PERF_CHANGES   13

Constraint: Disallow any performance level changes

§ PowerMSP432_ENTERING_SLEEP

#define PowerMSP432_ENTERING_SLEEP   0x1

Power event: The device is entering the SLEEP state

§ PowerMSP432_ENTERING_DEEPSLEEP

#define PowerMSP432_ENTERING_DEEPSLEEP   0x2

Power event: The device is entering a DEEPSLEEP state

§ PowerMSP432_ENTERING_SHUTDOWN

#define PowerMSP432_ENTERING_SHUTDOWN   0x4

Power event: The device is entering a SHUTDOWN state

§ PowerMSP432_AWAKE_SLEEP

#define PowerMSP432_AWAKE_SLEEP   0x8

Power event: The device is waking from the SLEEP state

§ PowerMSP432_AWAKE_DEEPSLEEP

#define PowerMSP432_AWAKE_DEEPSLEEP   0x10

Power event: The device is waking from a DEEPSLEEP state

§ PowerMSP432_START_CHANGE_PERF_LEVEL

#define PowerMSP432_START_CHANGE_PERF_LEVEL   0x20

Power event: A performance level change has been initiated

§ PowerMSP432_DONE_CHANGE_PERF_LEVEL

#define PowerMSP432_DONE_CHANGE_PERF_LEVEL   0x40

Power event: A performance level change has completed

§ PowerMSP432_SLEEP

#define PowerMSP432_SLEEP   0x1

Device state of LPM0

§ PowerMSP432_DEEPSLEEP_0

#define PowerMSP432_DEEPSLEEP_0   0x2

Device state of LPM3

§ PowerMSP432_DEEPSLEEP_1

#define PowerMSP432_DEEPSLEEP_1   0x4

Device state of LPM4

§ PowerMSP432_SHUTDOWN_0

#define PowerMSP432_SHUTDOWN_0   0x0

Device state of LPM3.5

§ PowerMSP432_SHUTDOWN_1

#define PowerMSP432_SHUTDOWN_1   0x1

Device state of LPM4.5

§ CS_DCO_TUNE_FREQ

#define CS_DCO_TUNE_FREQ   0x7

Tuned DCO frequency

Function Documentation

§ PowerMSP432_initPolicy()

void PowerMSP432_initPolicy ( void  )

The Power Policy initialization function.

This is an optional policy initialization function that will be called during application startup, during Power Manager initialization.

§ PowerMSP432_sleepPolicy()

void PowerMSP432_sleepPolicy ( void  )

The SLEEP Power Policy.

This is a simple Power Policy that will transition the device to the PowerMSP432_SLEEP state, unless there is a constraint prohibiting this. If PowerMSP432_SLEEP cannot be activated, CPU Wait For Interrupt (WFI) will be chosen instead.

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

§ PowerMSP432_deepSleepPolicy()

void PowerMSP432_deepSleepPolicy ( void  )

The DEEPSLEEP Power Policy.

This is an agressive Power Policy which checks active constraints and automatically transitions the device into the deepest sleep state possible.

The first goal is to enter PowerMSP432_DEEPSLEEP_1; if that is not allowed, the secondary goal is PowerMSP432_DEEPSLEEP_0; if that is not allowed, the next goal is PowerMSP432_SLEEP; and finally, if that is not allowed, CPU Wait For Interrupt (WFI) will be chosen.

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

© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale