MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Power

Overview

Enumerations

enum  _pmc_interrupt {
  kPMC_INT_LVDCORE = PMC_CTRL_LVDCOREIE_MASK,
  kPMC_INT_HVDCORE = PMC_CTRL_HVDCOREIE_MASK,
  kPMC_INT_HVD1V8 = PMC_CTRL_HVD1V8IE_MASK,
  kPMC_INT_AUTOWK = PMC_CTRL_AUTOWKEN_MASK,
  kPMC_INT_INTRPAD
}
 PMC event flags. More...
 
enum  _pmc_event_flags {
  kPMC_FLAGS_PORCORE = PMC_FLAGS_PORCOREF_MASK,
  kPMC_FLAGS_POR1V8,
  kPMC_FLAGS_PORAO18,
  kPMC_FLAGS_LVDCORE,
  kPMC_FLAGS_HVDCORE,
  kPMC_FLAGS_HVD1V8,
  kPMC_FLAGS_RTC,
  kPMC_FLAGS_AUTOWK,
  kPMC_FLAGS_INTNPADF = PMC_FLAGS_INTNPADF_MASK,
  kPMC_FLAGS_RESETNPAD = PMC_FLAGS_RESETNPADF_MASK,
  kPMC_FLAGS_DEEPPD = PMC_FLAGS_DEEPPDF_MASK
}
 PMC event flags. More...
 

Functions

static void POWER_EnablePD (pd_bit_t en)
 API to enable PDRUNCFG bit in the Sysctl0. More...
 
static void POWER_DisablePD (pd_bit_t en)
 API to disable PDRUNCFG bit in the Sysctl0. 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...
 
void POWER_UpdateOscSettlingTime (uint32_t osc_delay)
 API to updated XTAL oscillator settling time . More...
 
void POWER_ApplyPD (void)
 API to apply updated PMC PDRUNCFG bits in the Sysctl0. More...
 
void POWER_ClearEventFlags (uint32_t statusMask)
 Clears the PMC event flags state. More...
 
uint32_t POWER_GetEventFlags (void)
 Get the PMC event flags state. More...
 
void POWER_EnableInterrupts (uint32_t interruptMask)
 Enable the PMC interrupt requests. More...
 
void POWER_DisableInterrupts (uint32_t interruptMask)
 Disable the PMC interrupt requests. More...
 
void POWER_SetAnalogBuffer (bool enable)
 Set the PMC analog buffer for references or ATX2. More...
 
static uint32_t POWER_GetPmicMode (pmic_mode_reg_t reg)
 Get PMIC_MODE pins configure value. More...
 
static body_bias_mode_t POWER_GetBodyBiasMode (pmic_mode_reg_t reg)
 Get RBB/FBB bit value. More...
 
void POWER_EnterRbb (void)
 PMC Enter Rbb mode function call. More...
 
void POWER_EnterFbb (void)
 PMC Enter Fbb mode function call. More...
 
void POWER_EnterNbb (void)
 PMC exit Rbb & Fbb mode function call. More...
 
void POWER_SetLdoVoltageForFreq (uint32_t main_clk_freq, uint32_t dsp_main_clk_freq)
 PMC Set Ldo volatage function call. More...
 
void POWER_SetPmicMode (uint32_t mode, pmic_mode_reg_t reg)
 Set PMIC_MODE pins configure value. More...
 
void POWER_EnterSleep (void)
 Configures and enters in SLEEP low power mode. More...
 
void POWER_EnterDeepSleep (const uint32_t exclude_from_pd[4])
 PMC Deep Sleep function call. More...
 
void POWER_EnterDeepPowerDown (const uint32_t exclude_from_pd[4])
 PMC Deep Power Down function call. More...
 
void POWER_EnterFullDeepPowerDown (const uint32_t exclude_from_pd[4])
 PMC Full Deep Power Down function call. More...
 
void POWER_EnterPowerMode (power_mode_cfg_t mode, const uint32_t exclude_from_pd[4])
 Power Library API to enter different power mode. More...
 
void EnableDeepSleepIRQ (IRQn_Type interrupt)
 Enable specific interrupt for wake-up from deep-sleep mode. More...
 
void DisableDeepSleepIRQ (IRQn_Type interrupt)
 Disable specific interrupt for wake-up from deep-sleep mode. More...
 
uint32_t POWER_GetLibVersion (void)
 Power Library API to return the library version. More...
 

Driver version

#define FSL_POWER_DRIVER_VERSION   (MAKE_VERSION(2, 0, 1))
 power driver version 2.0.1. More...
 

Macro Definition Documentation

#define FSL_POWER_DRIVER_VERSION   (MAKE_VERSION(2, 0, 1))

Enumeration Type Documentation

Note
These enums are meant to be OR'd together to form a bit mask.
Enumerator
kPMC_INT_LVDCORE 

Vddcore Low-Voltage Detector Interrupt Enable.

kPMC_INT_HVDCORE 

Vddcore High-Voltage Detector Interrupt Enable.

kPMC_INT_HVD1V8 

Vdd1v8 High-Voltage Detector Interrupt Enable.

kPMC_INT_AUTOWK 

PMC automatic wakeup enable and interrupt enable.

kPMC_INT_INTRPAD 

Interrupt pad deep powerdown and deep sleep wake up & interrupt enable.

Note
These enums are meant to be OR'd together to form a bit mask.
Enumerator
kPMC_FLAGS_PORCORE 

POR triggered by the vddcore POR monitor (0 = no, 1 = yes).

kPMC_FLAGS_POR1V8 

vdd1v8 power on event detected since last cleared(0 = no, 1 = yes).

kPMC_FLAGS_PORAO18 

vdd_ao18 power on event detected since last cleared (0 = no, 1 = yes).

kPMC_FLAGS_LVDCORE 

LVD tripped since last time this bit was cleared (0 = no, 1 = yes).

kPMC_FLAGS_HVDCORE 

HVD tripped since last time this bit was cleared (0 = no, 1 = yes).

kPMC_FLAGS_HVD1V8 

vdd1v8 HVD tripped since last time this bit was cleared (0 = no, 1 = yes).

kPMC_FLAGS_RTC 

RTC wakeup detected since last time flag was cleared (0 = no, 1 = yes).

kPMC_FLAGS_AUTOWK 

PMC Auto wakeup caused a deep sleep wakeup and interrupt (0 = no, 1 = yes).

kPMC_FLAGS_INTNPADF 

Pad interrupt caused a wakeup or interrupt event since the last time this flag was cleared (0 = no, 1 = yes).

kPMC_FLAGS_RESETNPAD 

Reset pad wakeup caused a wakeup or reset event since the last time this bit was cleared.

(0 = no, 1 = yes).

kPMC_FLAGS_DEEPPD 

Deep powerdown was entered since the last time this flag was cleared (0 = no, 1 = yes).

Function Documentation

static void POWER_EnablePD ( pd_bit_t  en)
inlinestatic

Note that enabling the bit powers down the peripheral

Parameters
enperipheral for which to enable the PDRUNCFG bit
Returns
none
static void POWER_DisablePD ( pd_bit_t  en)
inlinestatic

Note that disabling the bit powers up the peripheral

Parameters
enperipheral for which to disable the PDRUNCFG bit
Returns
none
static void POWER_EnableDeepSleep ( void  )
inlinestatic
Parameters
none
Returns
none
static void POWER_DisableDeepSleep ( void  )
inlinestatic
Parameters
none
Returns
none
void POWER_UpdateOscSettlingTime ( uint32_t  osc_delay)
Parameters
osc_delay: OSC stabilization time in unit of microsecond
Returns
none
void POWER_ApplyPD ( void  )
Parameters
none
Returns
none
void POWER_ClearEventFlags ( uint32_t  statusMask)
Parameters
statusMask: A bitmask of event flags that are to be cleared.
Returns
none
uint32_t POWER_GetEventFlags ( void  )
Parameters
none
Returns
PMC FLAGS register value
void POWER_EnableInterrupts ( uint32_t  interruptMask)
Parameters
interruptMask: A bitmask of of interrupts to enable.
Returns
none
void POWER_DisableInterrupts ( uint32_t  interruptMask)
Parameters
interruptMask: A bitmask of of interrupts to disable.
Returns
none
void POWER_SetAnalogBuffer ( bool  enable)
Parameters
enable: Set to true to enable analog buffer for references or ATX2, false to disable.
Returns
none
static uint32_t POWER_GetPmicMode ( pmic_mode_reg_t  reg)
inlinestatic
Parameters
reg: PDSLEEPCFG0 or PDRUNCFG0 register offset
Returns
PMIC_MODE pins value in PDSLEEPCFG0
static body_bias_mode_t POWER_GetBodyBiasMode ( pmic_mode_reg_t  reg)
inlinestatic
Parameters
reg: PDSLEEPCFG0 or PDRUNCFG0 register offset
Returns
Current body bias mode
void POWER_EnterRbb ( void  )
Parameters
none
Returns
none
void POWER_EnterFbb ( void  )
Parameters
none
Returns
none
void POWER_EnterNbb ( void  )
Parameters
none
Returns
none
void POWER_SetLdoVoltageForFreq ( uint32_t  main_clk_freq,
uint32_t  dsp_main_clk_freq 
)
Parameters
main_clk_freq: main clock frequency value
dsp_main_clk_freq: dsp main clock frequency value
Returns
none
void POWER_SetPmicMode ( uint32_t  mode,
pmic_mode_reg_t  reg 
)
Parameters
mode: PMIC MODE pin value
reg: PDSLEEPCFG0 or PDRUNCFG0 register offset
Returns
PMIC_MODE pins value in PDSLEEPCFG0
void POWER_EnterSleep ( void  )
Parameters
none
Returns
none
void POWER_EnterDeepSleep ( const uint32_t  exclude_from_pd[4])
Parameters
exclude_from_pdBit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during Deep Sleep mode selected.
Returns
none
void POWER_EnterDeepPowerDown ( const uint32_t  exclude_from_pd[4])
Parameters
exclude_from_pdBit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during Deep Power Down mode selected.
Returns
none
void POWER_EnterFullDeepPowerDown ( const uint32_t  exclude_from_pd[4])
Parameters
exclude_from_pdBit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during Full Deep Power Down mode selected.
Returns
none
void POWER_EnterPowerMode ( power_mode_cfg_t  mode,
const uint32_t  exclude_from_pd[4] 
)
Parameters
exclude_from_pdBit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during power mode selected.
Returns
none
void EnableDeepSleepIRQ ( IRQn_Type  interrupt)

Enable the interrupt for wake-up from deep sleep mode. Some interrupts are typically used in sleep mode only and will not occur during deep-sleep mode because relevant clocks are stopped. However, it is possible to enable those clocks (significantly increasing power consumption in the reduced power mode), making these wake-ups possible.

Note
This function also enables the interrupt in the NVIC (EnableIRQ() is called internally).
Parameters
interruptThe IRQ number.
Returns
none
void DisableDeepSleepIRQ ( IRQn_Type  interrupt)

Disable the interrupt for wake-up from deep sleep mode. Some interrupts are typically used in sleep mode only and will not occur during deep-sleep mode because relevant clocks are stopped. However, it is possible to enable those clocks (significantly increasing power consumption in the reduced power mode), making these wake-ups possible.

Note
This function also disables the interrupt in the NVIC (DisableIRQ() is called internally).
Parameters
interruptThe IRQ number.
Returns
none
uint32_t POWER_GetLibVersion ( void  )
Parameters
none
Returns
version number of the power library