![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Power driver provides APIs to control peripherals power and control the system power mode.
Data Structures | |
struct | power_pad_vrange_t |
pad voltage range configuration. More... | |
Macros | |
#define | PMIC_VDDCORE_RECOVERY_TIME_IGNORE (0xFFFFFFFFU) |
PMIC is used but vddcore supply is always above LVD threshold. More... | |
#define | POWER_INVALID_VOLT_LEVEL (0xFFFFFFFFU) |
Invalid voltage level. More... | |
#define | SYSCTL0_TUPLE_REG(reg) (*((volatile uint32_t *)(((uint32_t)(SYSCTL0)) + (((uint32_t)(reg)) & 0xFFFU)))) |
PMIC mode pin configuration API parameter. | |
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. | |
static void | POWER_DisableDeepSleep (void) |
API to disable deep sleep bit in the ARM Core. | |
void | POWER_UpdateOscSettlingTime (uint32_t osc_delay) |
API to update XTAL oscillator settling time . More... | |
void | POWER_UpdatePmicRecoveryTime (uint32_t pmic_delay) |
API to update on-board PMIC vddcore recovery time. More... | |
void | POWER_ApplyPD (void) |
API to apply updated PMC PDRUNCFG bits in the Sysctl0. | |
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_SetPadVolRange (const power_pad_vrange_t *config) |
Configure pad voltage level. More... | |
void | POWER_EnterRbb (void) |
PMC Enter Rbb mode function call. | |
void | POWER_EnterFbb (void) |
PMC Enter Fbb mode function call. | |
void | POWER_EnterNbb (void) |
PMC exit Rbb & Fbb mode function call. | |
bool | POWER_SetLdoVoltageForFreq (power_part_temp_range_t tempRange, power_volt_op_range_t voltOpRange, uint32_t cm33Freq, uint32_t dspFreq) |
PMC Set Ldo volatage for particular frequency. NOTE: The API is only valid when MAINPLLCLKDIV[7:0] and DSPPLLCLKDIV[7:0] are 0. If LVD falling trip voltage is higher than the required core voltage for particular frequency, LVD voltage will be decreased to safe level to avoid unexpected LVD reset or interrupt event. More... | |
void | POWER_SetLvdFallingTripVoltage (power_lvd_falling_trip_vol_val_t volt) |
Set vddcore low voltage detection falling trip voltage. More... | |
power_lvd_falling_trip_vol_val_t | POWER_GetLvdFallingTripVoltage (void) |
Get current vddcore low voltage detection falling trip voltage. More... | |
void | POWER_DisableLVD (void) |
Disable low voltage detection, no reset or interrupt is triggered when vddcore voltage drops below threshold. NOTE: This API is for internal use only. Application should not touch it. | |
void | POWER_RestoreLVD (void) |
Restore low voltage detection setting. NOTE: This API is for internal use only. Application should not touch it. | |
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. | |
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... | |
Variables | |
const uint32_t | powerLowCm33FreqLevel [2][3] |
Frequency levels defined in power library. More... | |
Driver version | |
#define | FSL_POWER_DRIVER_VERSION (MAKE_VERSION(2, 3, 0)) |
power driver version 2.3.0. More... | |
struct power_pad_vrange_t |
Data Fields | |
uint32_t | Vdde0Range: 2 |
VDDE0 voltage range for VDDIO_0. More... | |
uint32_t | Vdde1Range: 2 |
VDDE1 voltage range for VDDIO_1. More... | |
uint32_t | Vdde2Range: 2 |
VDDE2 voltage range for VDDIO_2. More... | |
uint32_t | __pad0__: 26 |
Reserved. More... | |
uint32_t power_pad_vrange_t::Vdde0Range |
uint32_t power_pad_vrange_t::Vdde1Range |
uint32_t power_pad_vrange_t::Vdde2Range |
uint32_t power_pad_vrange_t::__pad0__ |
#define FSL_POWER_DRIVER_VERSION (MAKE_VERSION(2, 3, 0)) |
#define PMIC_VDDCORE_RECOVERY_TIME_IGNORE (0xFFFFFFFFU) |
#define POWER_INVALID_VOLT_LEVEL (0xFFFFFFFFU) |
enum _pmc_interrupt |
enum _pmc_event_flags |
|
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 |
void POWER_UpdateOscSettlingTime | ( | uint32_t | osc_delay | ) |
osc_delay | : OSC stabilization time in unit of microsecond |
void POWER_UpdatePmicRecoveryTime | ( | uint32_t | pmic_delay | ) |
NOTE: If LDO is used instead of PMIC, don't call it. Otherwise it must be called to allow power library to well handle the deep sleep process.
pmic_delay | : PMIC stabilization time in unit of microsecond, or PMIC_VDDCORE_RECOVERY_TIME_IGNORE if not care. |
void POWER_ClearEventFlags | ( | uint32_t | statusMask | ) |
statusMask | : A bitmask of event flags that are to be cleared. |
uint32_t POWER_GetEventFlags | ( | void | ) |
void POWER_EnableInterrupts | ( | uint32_t | interruptMask | ) |
interruptMask | : A bitmask of of interrupts to enable. |
void POWER_DisableInterrupts | ( | uint32_t | interruptMask | ) |
interruptMask | : A bitmask of of interrupts to disable. |
void POWER_SetAnalogBuffer | ( | bool | enable | ) |
enable | : Set to true to enable analog buffer for references or ATX2, false to disable. |
|
inlinestatic |
reg | : PDSLEEPCFG0 or PDRUNCFG0 register offset |
|
inlinestatic |
reg | : PDSLEEPCFG0 or PDRUNCFG0 register offset |
void POWER_SetPadVolRange | ( | const power_pad_vrange_t * | config | ) |
Wide voltage range cost more power due to enabled voltage detector.
NOTE: BE CAUTIOUS TO CALL THIS API. IF THE PAD SUPPLY IS BEYOND THE SET RANGE, SILICON MIGHT BE DAMAGED.
config | pad voltage range configuration. |
bool POWER_SetLdoVoltageForFreq | ( | power_part_temp_range_t | tempRange, |
power_volt_op_range_t | voltOpRange, | ||
uint32_t | cm33Freq, | ||
uint32_t | dspFreq | ||
) |
tempRange | : part temperature range |
voltOpRange | : voltage operation range. |
cm33Freq | : CM33 CPU clock frequency value |
dspFreq | : DSP CPU clock frequency value |
void POWER_SetLvdFallingTripVoltage | ( | power_lvd_falling_trip_vol_val_t | volt | ) |
volt | target LVD voltage to set. |
power_lvd_falling_trip_vol_val_t POWER_GetLvdFallingTripVoltage | ( | void | ) |
void POWER_SetPmicMode | ( | uint32_t | mode, |
pmic_mode_reg_t | reg | ||
) |
mode | : PMIC MODE pin value |
reg | : PDSLEEPCFG0 or PDRUNCFG0 register offset |
void POWER_EnterDeepSleep | ( | const uint32_t | exclude_from_pd[4] | ) |
exclude_from_pd | Bit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during Deep Sleep mode selected. |
void POWER_EnterDeepPowerDown | ( | const uint32_t | exclude_from_pd[4] | ) |
exclude_from_pd | Bit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during Deep Power Down mode selected. |
void POWER_EnterFullDeepPowerDown | ( | const uint32_t | exclude_from_pd[4] | ) |
exclude_from_pd | Bit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during Full Deep Power Down mode selected. |
void POWER_EnterPowerMode | ( | power_mode_cfg_t | mode, |
const uint32_t | exclude_from_pd[4] | ||
) |
mode | Power mode to enter. |
exclude_from_pd | Bit mask of the PDRUNCFG0 ~ PDRUNCFG3 that needs to be powered on during power mode selected. |
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.
interrupt | The IRQ number. |
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.
interrupt | The IRQ number. |
uint32_t POWER_GetLibVersion | ( | void | ) |
const uint32_t powerLowCm33FreqLevel[2][3] |