![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Power driver provides APIs to control system power and power mode.
Files | |
| file | fsl_power.h |
Data Structures | |
| struct | power_init_config_t |
| Init configuration. More... | |
| struct | power_sleep_config_t |
| Sleep configuration. More... | |
| struct | power_gdet_data_t |
| Glitch detector configuration. More... | |
Typedefs | |
| typedef void(* | capt_pulse_timer_callback_t )(void *param) |
| Capture timer callback function. More... | |
| typedef void(* | power_switch_callback_t )(uint32_t mode, void *param) |
| Power mode switch callback function. More... | |
| typedef bool(* | power_load_gdet_cfg )(power_gdet_data_t *data) |
| Glitch detector configuration load function. | |
Functions | |
| __STATIC_INLINE void | POWER_EnableResetSource (uint32_t source) |
| Enable system reset source. More... | |
| __STATIC_INLINE void | POWER_DisableResetSource (uint32_t source) |
| Disable system reset source. More... | |
| __STATIC_INLINE uint32_t | POWER_GetResetCause (void) |
| Get last reset cause. More... | |
| __STATIC_INLINE void | POWER_ClearResetCause (uint32_t cause) |
| Clear last reset cause. More... | |
| __STATIC_INLINE void | POWER_ConfigWakeupPin (power_wakeup_pin_t pin, power_wakeup_edge_t edge) |
| Configure pin edge for wakeup. More... | |
| bool | POWER_GetWakeupStatus (IRQn_Type irq) |
| Check if IRQ is the wakeup source. More... | |
| void | POWER_ClearWakeupStatus (IRQn_Type irq) |
| Clear wakeup status. More... | |
| void | POWER_EnableWakeup (IRQn_Type irq) |
| Enable the Wakeup interrupt. More... | |
| void | POWER_DisableWakeup (IRQn_Type irq) |
| Disable the Wakeup interrupts. More... | |
| AT_QUICKACCESS_SECTION_CODE (void POWER_SetSleepMode(uint32_t mode)) | |
| Set power mode on idle. More... | |
| __STATIC_INLINE uint32_t | POWER_GetWakenMode (void) |
| Get power mode waken up from. More... | |
| void | POWER_GetCurrentSleepConfig (power_sleep_config_t *config) |
| Get current sleep configuration. More... | |
| void | POWER_InitPowerConfig (const power_init_config_t *config) |
| Initialize power configuration. More... | |
| void | POWER_ConfigCauInSleep (bool pdCau) |
| Configure CAU_SOC_SLP_REF_GEN_CLK on/off status in SoC sleep mode. More... | |
| void | POWER_SetPowerSwitchCallback (power_switch_callback_t pre, void *preParam, power_switch_callback_t post, void *postParam) |
| Set power mode switch callback. The callbacks are called with interrupt disabled. More... | |
| AT_QUICKACCESS_SECTION_CODE (bool POWER_EnterPowerMode(uint32_t mode, const power_sleep_config_t *config)) | |
| Switch system into certain power mode. More... | |
| void | POWER_PowerOnWlan (void) |
| Power on WLAN. | |
| void | POWER_PowerOffWlan (void) |
| Power off WLAN. | |
| __STATIC_INLINE void | PMU_EnableWlanWakeup (uint8_t wlWakeup) |
| Enable MCI wakeup WLAN. More... | |
| __STATIC_INLINE void | PMU_DisableWlanWakeup (uint8_t wlWakeup) |
| Disable MCI wakeup WLAN. More... | |
| void | POWER_PowerOnBle (void) |
| Power on BLE. | |
| void | POWER_PowerOffBle (void) |
| Power off BLE. | |
| __STATIC_INLINE void | PMU_EnableBleWakeup (uint8_t bleWakeup) |
| Enable MCI wakeup BLE. More... | |
| __STATIC_INLINE void | PMU_DisableBleWakeup (uint8_t bleWakeup) |
| Disable MCI wakeup BLE. More... | |
| void | POWER_PowerOnGau (void) |
| Power on GAU. | |
| void | POWER_PowerOffGau (void) |
| Power off GAU. | |
| void | POWER_EnableCaptSlowPulseTimer (capt_slow_pulse_width_t width, capt_slow_pulse_edge_t edge, uint32_t timeout, capt_pulse_timer_callback_t cb, void *param) |
| Enable capture slow pulse timer with 32768Hz clock source. More... | |
| void | POWER_EnableCaptFastPulseTimer (uint32_t timeout, capt_pulse_timer_callback_t cb, void *param) |
| Enable capture fast pulse timer with 3.84/4MHz clock source. More... | |
| void | POWER_DisableCaptPulseTimer (void) |
| Disable capture pulse timer. | |
| void | POWER_InitVoltage (uint32_t dro, uint32_t pack) |
| Configure power rail voltage and LVD/HVD threshold. More... | |
| void | Power_InitLoadGdetCfg (power_load_gdet_cfg loadFunc, const power_gdet_data_t *data, uint32_t pack) |
| Initialize glitch detector configuration. More... | |
| AT_QUICKACCESS_SECTION_CODE (void POWER_DisableGDetVSensors(void)) | |
| Disable GDET and VSensors. | |
| AT_QUICKACCESS_SECTION_CODE (bool POWER_EnableGDetVSensors(void)) | |
| Enable GDET and VSensors. More... | |
| uint32_t | POWER_TrimSvc (uint32_t gdetTrim, uint32_t pack) |
| Apply SVC GDC equation and get the SVC trim configuration. More... | |
Driver version | |
| #define | FSL_POWER_DRIVER_VERSION (MAKE_VERSION(2, 5, 0)) |
| POWER driver version 2.5.0. More... | |
| struct power_init_config_t |
Data Fields | |
| bool | iBuck |
| true: VCORE and AVDD18 supplied from iBuck; false: supplied from external DCDC. More... | |
| bool | gateCauRefClk |
| true: CAU_SOC_SLP_REF_GEN_CLK gated; false: CAU_SOC_SLP_REF_GEN_CLK on. More... | |
| bool power_init_config_t::iBuck |
| bool power_init_config_t::gateCauRefClk |
| struct power_sleep_config_t |
Data Fields | |
| uint32_t | pm2MemPuCfg |
| Modules to keep powered on in PM2 mode. More... | |
| uint32_t | pm2AnaPuCfg |
| Ana to keep powered on in PM2 mode. More... | |
| uint32_t | clkGate |
| Source clock gate control. More... | |
| uint32_t | memPdCfg |
| PMU MEM_CFG: Power Down memory configuration. More... | |
| uint32_t | pm3BuckCfg |
| PMIP BUCK control in PM3 mode. More... | |
| uint32_t power_sleep_config_t::pm2MemPuCfg |
Logical OR of the enums in _pm2_mem_pu_bits.
| uint32_t power_sleep_config_t::pm2AnaPuCfg |
Logical OR of the enums in _pm2_ana_pu_bits.
| uint32_t power_sleep_config_t::clkGate |
Logical OR of the enums in _clk_gate_bits.
| uint32_t power_sleep_config_t::memPdCfg |
Bit0-5 for PM3, bit8 for PM4. bit0: ram0-5 384KB bit1: ram6 64KB bit2: ram7 64KB bit3: ram8-9 128KB bit4: ram10-13 256KB bit5: ram14-18 320KB. bit8: aon mem higher 8KB
| uint32_t power_sleep_config_t::pm3BuckCfg |
Logical OR of the enums in _clk_pm3_buck_bits.
| struct power_gdet_data_t |
| #define FSL_POWER_DRIVER_VERSION (MAKE_VERSION(2, 5, 0)) |
| typedef void(* capt_pulse_timer_callback_t)(void *param) |
| param | : User parameter for callback. |
| typedef void(* power_switch_callback_t)(uint32_t mode, void *param) |
| mode | : Power mode to switch. |
| param | : User parameter for callback. |
| enum power_wakeup_edge_t |
| enum power_wakeup_pin_t |
| enum power_reset_cause_t |
| Enumerator | |
|---|---|
| kPOWER_ResetCauseSysResetReq |
CM33 system soft reset request. |
| kPOWER_ResetCauseLockup |
CM33 locked up. |
| kPOWER_ResetCauseWdt |
Watchdog timer. |
| kPOWER_ResetCauseApResetReq |
Debug mailbox reset. |
| kPOWER_ResetCauseCodeWdt |
Code watchdog timer. |
| kPOWER_ResetCauseItrc |
ITRC_CHIP reset. |
| kPOWER_ResetCauseResetB |
sw_resetb_scantest reset. |
| kPOWER_ResetCauseAll |
All reset causes. Used in POWER_ClearResetCause(). |
| enum power_reset_source_t |
| enum _clk_pm3_buck_bits |
| __STATIC_INLINE void POWER_EnableResetSource | ( | uint32_t | source | ) |
| source | : A bitmask of of power_reset_source_t |
| __STATIC_INLINE void POWER_DisableResetSource | ( | uint32_t | source | ) |
| source | : A bitmask of of power_reset_source_t |
| __STATIC_INLINE uint32_t POWER_GetResetCause | ( | void | ) |
| __STATIC_INLINE void POWER_ClearResetCause | ( | uint32_t | cause | ) |
| cause | : A bitmask of of power_reset_cause_t |
| __STATIC_INLINE void POWER_ConfigWakeupPin | ( | power_wakeup_pin_t | pin, |
| power_wakeup_edge_t | edge | ||
| ) |
| pin | : Wakeup pin |
| edge | : Pin level for wakeup |
| bool POWER_GetWakeupStatus | ( | IRQn_Type | irq | ) |
| irq | : IRQ number |
| void POWER_ClearWakeupStatus | ( | IRQn_Type | irq | ) |
| irq | : IRQ number |
| void POWER_EnableWakeup | ( | IRQn_Type | irq | ) |
| irq | : IRQ number |
| void POWER_DisableWakeup | ( | IRQn_Type | irq | ) |
| irq | : IRQ number |
| AT_QUICKACCESS_SECTION_CODE | ( | void | POWER_SetSleepModeuint32_t mode | ) |
| mode | : 0 ~ 4 stands for PM0 ~ PM4. |
| __STATIC_INLINE uint32_t POWER_GetWakenMode | ( | void | ) |
| void POWER_GetCurrentSleepConfig | ( | power_sleep_config_t * | config | ) |
| config | : Pointer to config structure to save current config. |
| void POWER_InitPowerConfig | ( | const power_init_config_t * | config | ) |
| config | : Pointer to init config structure. |
| void POWER_ConfigCauInSleep | ( | bool | pdCau | ) |
| pdCau | : true for clock off; false for clock on. |
| void POWER_SetPowerSwitchCallback | ( | power_switch_callback_t | pre, |
| void * | preParam, | ||
| power_switch_callback_t | post, | ||
| void * | postParam | ||
| ) |
| pre | : Function called before power mode switch |
| preParam | : User parameter for pre callback |
| post | : Function called after power mode switch |
| postParam | : User parameter for post callback |
| AT_QUICKACCESS_SECTION_CODE | ( | bool | POWER_EnterPowerModeuint32_t mode, const power_sleep_config_t *config | ) |
| mode | : 0 ~ 4 stands for PM0 ~ PM4. |
| config | : Sleep configuration on PM2-PM4. |
| __STATIC_INLINE void PMU_EnableWlanWakeup | ( | uint8_t | wlWakeup | ) |
| wlWakeup | : 8 bits wakeup mask |
| __STATIC_INLINE void PMU_DisableWlanWakeup | ( | uint8_t | wlWakeup | ) |
| wlWakeup | : 8 bits wakeup mask |
| __STATIC_INLINE void PMU_EnableBleWakeup | ( | uint8_t | bleWakeup | ) |
| bleWakeup | : 8 bits wakeup mask |
| __STATIC_INLINE void PMU_DisableBleWakeup | ( | uint8_t | bleWakeup | ) |
| bleWakeup | : 8 bits wakeup mask |
| void POWER_EnableCaptSlowPulseTimer | ( | capt_slow_pulse_width_t | width, |
| capt_slow_pulse_edge_t | edge, | ||
| uint32_t | timeout, | ||
| capt_pulse_timer_callback_t | cb, | ||
| void * | param | ||
| ) |
| width | : input capture filter width in cycles |
| edge | : trigger condition of counter |
| timeout | : timer expire counter which will trigger callback |
| callback | : callback function on timer expire |
| param | : callback parameter |
| void POWER_EnableCaptFastPulseTimer | ( | uint32_t | timeout, |
| capt_pulse_timer_callback_t | cb, | ||
| void * | param | ||
| ) |
| timeout | : timer expire counter which will trigger callback |
| callback | : callback function on timer expire |
| param | : callback parameter |
| void POWER_InitVoltage | ( | uint32_t | dro, |
| uint32_t | pack | ||
| ) |
| dro | : trim value from fuse. |
| pack | : Device package type: 0 - QFN, 1 - CSP, 2 - BGA |
| void Power_InitLoadGdetCfg | ( | power_load_gdet_cfg | loadFunc, |
| const power_gdet_data_t * | data, | ||
| uint32_t | pack | ||
| ) |
| loadFunc | : function pointer to the GDET load configuration. |
| data | : GDET config data loaded from fuse. |
| pack | : Device package type: 0 - QFN, 1 - CSP, 2 - BGA |
| AT_QUICKACCESS_SECTION_CODE | ( | bool | POWER_EnableGDetVSensorsvoid | ) |
| uint32_t POWER_TrimSvc | ( | uint32_t | gdetTrim, |
| uint32_t | pack | ||
| ) |
| gdetTrim | : GDET trim value from fuse. |
| pack | : Device package type: 0 - QFN, 1 - CSP, 2 - BGA |