48 #ifndef ti_drivers_power_PowerMSP432__include
49 #define ti_drivers_power_PowerMSP432__include
56 #include <ti/devices/msp432p4xx/driverlib/pcm.h>
57 #include <ti/devices/msp432p4xx/driverlib/cs.h>
66 #define PowerMSP432_RESUMETIMESLEEP 32
69 #define PowerMSP432_TOTALTIMESLEEP 40
72 #define PowerMSP432_RESUMETIMEDEEPSLEEP_0 16
75 #define PowerMSP432_TOTALTIMEDEEPSLEEP_0 40
78 #define PowerMSP432_RESUMETIMEDEEPSLEEP_1 16
81 #define PowerMSP432_TOTALTIMEDEEPSLEEP_1 40
84 #define PowerMSP432_PERIPH_ADC14 0
87 #define PowerMSP432_PERIPH_DMA 1
90 #define PowerMSP432_PERIPH_EUSCI_A0 2
93 #define PowerMSP432_PERIPH_EUSCI_A1 3
96 #define PowerMSP432_PERIPH_EUSCI_A2 4
99 #define PowerMSP432_PERIPH_EUSCI_A3 5
102 #define PowerMSP432_PERIPH_EUSCI_B0 6
105 #define PowerMSP432_PERIPH_EUSCI_B1 7
108 #define PowerMSP432_PERIPH_EUSCI_B2 8
111 #define PowerMSP432_PERIPH_EUSCI_B3 9
114 #define PowerMSP432_PERIPH_TIMER_A0 10
117 #define PowerMSP432_PERIPH_TIMER_A1 11
120 #define PowerMSP432_PERIPH_TIMER_A2 12
123 #define PowerMSP432_PERIPH_TIMER_A3 13
126 #define PowerMSP432_PERIPH_TIMER_T32 14
131 #define PowerMSP432_DISALLOW_SLEEP 0
134 #define PowerMSP432_DISALLOW_DEEPSLEEP_0 1
137 #define PowerMSP432_DISALLOW_DEEPSLEEP_1 2
140 #define PowerMSP432_DISALLOW_SHUTDOWN_0 3
143 #define PowerMSP432_DISALLOW_SHUTDOWN_1 4
146 #define PowerMSP432_DISALLOW_PERFLEVEL_0 5
149 #define PowerMSP432_DISALLOW_PERFLEVEL_1 6
152 #define PowerMSP432_DISALLOW_PERFLEVEL_2 7
155 #define PowerMSP432_DISALLOW_PERFLEVEL_3 8
158 #define PowerMSP432_DISALLOW_PERFLEVEL_4 9
161 #define PowerMSP432_DISALLOW_PERF_CHANGES 10
165 #define PowerMSP432_NUMCONSTRAINTS 11
173 #define PowerMSP432_ENTERING_SLEEP 0x1
176 #define PowerMSP432_ENTERING_DEEPSLEEP 0x2
179 #define PowerMSP432_ENTERING_SHUTDOWN 0x4
182 #define PowerMSP432_AWAKE_SLEEP 0x8
185 #define PowerMSP432_AWAKE_DEEPSLEEP 0x10
188 #define PowerMSP432_START_CHANGE_PERF_LEVEL 0x20
191 #define PowerMSP432_DONE_CHANGE_PERF_LEVEL 0x40
195 #define PowerMSP432_NUMEVENTS 7
199 #define PowerMSP432_SLEEP 0x1
200 #define PowerMSP432_DEEPSLEEP_0 0x2
201 #define PowerMSP432_DEEPSLEEP_1 0x4
204 #define PowerMSP432_SHUTDOWN_0 0x0
205 #define PowerMSP432_SHUTDOWN_1 0x1
211 typedef struct PowerMSP432_PerfLevel {
212 unsigned int activeState;
214 unsigned int clockSource;
215 unsigned int DCORESEL;
219 unsigned int flashWaitStates;
220 bool enableFlashBuffer;
225 } PowerMSP432_PerfLevel;
382 typedef struct PowerMSP432_ModuleState {
384 uint32_t constraintMask;
386 unsigned int currentPerfLevel;
388 bool perfInitialized;
390 uint8_t constraintCounts[PowerMSP432_NUMCONSTRAINTS];
392 } PowerMSP432_ModuleState;
454 void PowerMSP432_schedulerDisable(
void);
461 void PowerMSP432_schedulerRestore(
void);
464 uint_fast16_t PowerMSP432_getNumPerfLevels(
void);
467 int_fast16_t PowerMSP432_getFreqs(uint_fast16_t level,
476 #define Power_getDependencyCount(resourceId) Power_EINVALIDINPUT
477 #define Power_releaseDependency(resourceId) Power_EINVALIDINPUT
478 #define Power_setDependency(resourceId) Power_EINVALIDINPUT
bool enablePerf
Boolean specifying if performance scaling is enabled.
Definition: PowerMSP432.h:303
Structure holding device frequencies (in Hz)
Definition: PowerMSP432.h:229
void PowerMSP432_sleepPolicy(void)
The SLEEP Power Policy.
unsigned int MCLK
Definition: PowerMSP432.h:230
struct PowerMSP432_ConfigV1 PowerMSP432_ConfigV1
Power global configuration (MSP432-specific)
unsigned int HSMCLK
Definition: PowerMSP432.h:231
void(* Power_PolicyInitFxn)(void)
Power policy initialization function pointer.
Definition: Power.h:92
struct PowerMSP432_Freqs PowerMSP432_Freqs
Structure holding device frequencies (in Hz)
void PowerMSP432_initPolicy(void)
The Power Policy initialization function.
void(* Power_PolicyFxn)(void)
Power policy function pointer.
Definition: Power.h:97
Power global configuration (MSP432-specific)
Definition: PowerMSP432.h:237
bool enableParking
Boolean specifying if pull resistors should be automatically applied to input pins during PowerMSP432...
Definition: PowerMSP432.h:375
bool enablePolicy
Boolean specifying if the Power Policy function is enabled.
Definition: PowerMSP432.h:292
void PowerMSP432_deepSleepPolicy(void)
The DEEPSLEEP Power Policy.
Power_PolicyFxn policyFxn
The Power Policy function.
Definition: PowerMSP432.h:267
unsigned int ACLK
Definition: PowerMSP432.h:233
Power_PolicyInitFxn policyInitFxn
The Power Policy's initialization function.
Definition: PowerMSP432.h:244
unsigned int SMCLK
Definition: PowerMSP432.h:232
unsigned int initialPerfLevel
The initial performance level to be established during Power Manager initialization.
Definition: PowerMSP432.h:279
Linked List interface for use in drivers.