![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Power driver provides APIs to control peripherals power and control the system power mode.
Files | |
| file | fsl_power.h |
Data Structures | |
| struct | _power_bod_config |
| The configuration of power bod, including reset level, interrupt level, and so on. More... | |
Typedefs | |
| typedef enum _power_bod_status | power_bod_status_t |
| The enumeration of BOD status flags. | |
| typedef enum _power_bod_reset_level | power_bod_reset_level_t |
| The enumeration of BOD reset level. | |
|
typedef enum _power_bod_interrupt_level | power_bod_interrupt_level_t |
| The enumeration of BOD interrupt level. | |
| typedef struct _power_bod_config | power_bod_config_t |
| The configuration of power bod, including reset level, interrupt level, and so on. | |
Enumerations | |
| enum | _power_bod_status { kBod_ResetStatusFlag = SYSCON_BODCTRL_BODRSTSTAT_MASK, kBod_InterruptStatusFlag = SYSCON_BODCTRL_BODINTSTAT_MASK } |
| The enumeration of BOD status flags. More... | |
| enum | _power_bod_reset_level { kBod_ResetLevel0 = 0U, kBod_ResetLevel1, kBod_ResetLevel2, kBod_ResetLevel3 } |
| The enumeration of BOD reset level. More... | |
| enum | _power_bod_interrupt_level { kBod_InterruptLevel0 = 0U, kBod_InterruptLevel1, kBod_InterruptLevel2, kBod_InterruptLevel3 } |
| The enumeration of BOD interrupt level. More... | |
Driver version | |
| #define | FSL_POWER_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
| power driver version 2.1.0. More... | |
Power Configuration | |
| static void | POWER_EnablePD (pd_bit_t en) |
| API to enable PDRUNCFG bit in the Syscon. More... | |
| static void | POWER_DisablePD (pd_bit_t en) |
| API to disable PDRUNCFG bit in the Syscon. More... | |
| static void | POWER_EnableDeepSleep (void) |
| API to enable deep sleep bit in the ARM Core. More... | |
| static void | POWER_DisableDeepSleep (void) |
| API to disable deep sleep bit in the ARM Core. More... | |
| static void | POWER_PowerDownFlash (void) |
| API to power down flash controller. More... | |
| static void | POWER_PowerUpFlash (void) |
| API to power up flash controller. More... | |
| void | POWER_EnterPowerMode (power_mode_cfg_t mode, uint64_t exclude_from_pd) |
| Power Library API to enter different power mode. More... | |
| void | POWER_EnterSleep (void) |
| Power Library API to enter sleep mode. More... | |
| void | POWER_EnterDeepSleep (uint64_t exclude_from_pd) |
| Power Library API to enter deep sleep mode. More... | |
| void | POWER_EnterDeepPowerDown (uint64_t exclude_from_pd) |
| Power Library API to enter deep power down mode. More... | |
| void | POWER_SetVoltageForFreq (uint32_t freq) |
| Power Library API to choose normal regulation and set the voltage for the desired operating frequency. More... | |
| void | POWER_SetLowPowerVoltageForFreq (uint32_t freq) |
| Power Library API to choose low power regulation and set the voltage for the desired operating frequency. More... | |
| uint32_t | POWER_GetLibVersion (void) |
| Power Library API to return the library version. More... | |
| void | POWER_InitBod (const power_bod_config_t *bodConfig) |
| Initialize BOD, including enabling/disabling BOD interrupt, enabling/disabling BOD reset, setting BOD interrupt level, and reset level. More... | |
| void | POWER_GetDefaultBodConfig (power_bod_config_t *bodConfig) |
| Get default BOD configuration. More... | |
| static void | POWER_DeinitBod (void) |
| De-initialize BOD. | |
| static uint32_t | POWER_GetBodStatusFlags (void) |
| Get Bod status flags. More... | |
| static void | POWER_ClearBodStatusFlags (uint32_t mask) |
| Clear Bod status flags. More... | |
| struct _power_bod_config |
Data Fields | |
| bool | enableReset |
| Enable/disable BOD reset function. More... | |
| power_bod_reset_level_t | resetLevel |
| BOD reset level, please refer to power_bod_reset_level_t. More... | |
| bool | enableInterrupt |
| Enable/disable BOD interrupt function. More... | |
| power_bod_interrupt_level_t | interruptLevel |
| BOD interrupt level, please refer to power_bod_interrupt_level_t. More... | |
| bool _power_bod_config::enableReset |
| power_bod_reset_level_t _power_bod_config::resetLevel |
| bool _power_bod_config::enableInterrupt |
| power_bod_interrupt_level_t _power_bod_config::interruptLevel |
| #define FSL_POWER_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
| enum _power_bod_status |
|
inlinestatic |
Note that enabling the bit powers down the peripheral
| en | peripheral for which to enable the PDRUNCFG bit |
|
inlinestatic |
Note that disabling the bit powers up the peripheral
| en | peripheral for which to disable the PDRUNCFG bit |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void POWER_EnterPowerMode | ( | power_mode_cfg_t | mode, |
| uint64_t | exclude_from_pd | ||
| ) |
| mode | |
| exclude_from_pd | Bit mask of the PDRUNCFG bits that needs to be powered on during deep sleep |
| void POWER_EnterSleep | ( | void | ) |
| void POWER_EnterDeepSleep | ( | uint64_t | exclude_from_pd | ) |
| exclude_from_pd | Bit mask of the PDRUNCFG bits that needs to be powered on during deep sleep |
| void POWER_EnterDeepPowerDown | ( | uint64_t | exclude_from_pd | ) |
| exclude_from_pd | Bit mask of the PDRUNCFG bits that needs to be powered on during deep power down mode, but this is has no effect as the voltages are cut off. |
| void POWER_SetVoltageForFreq | ( | uint32_t | freq | ) |
| freq | - The desired frequency at which the part would like to operate, note that the voltage and flash wait states should be set before changing frequency |
| void POWER_SetLowPowerVoltageForFreq | ( | uint32_t | freq | ) |
| freq | - The desired frequency at which the part would like to operate, note only 12MHz and 48Mhz are supported |
| uint32_t POWER_GetLibVersion | ( | void | ) |
| void POWER_InitBod | ( | const power_bod_config_t * | bodConfig | ) |
| bodConfig | Pointer the the structure power_bod_config_t. |
| void POWER_GetDefaultBodConfig | ( | power_bod_config_t * | bodConfig | ) |
| bodConfig | Pointer the the structure power_bod_config_t. |
|
inlinestatic |
|
inlinestatic |
| mask | The mask of status flags to clear, should be the OR'ed value of power_bod_status_t. |