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

Overview

The MCUXpresso SDK provides a peripheral driver for the Power Management Unit (PMU) module of MCUXpresso SDK devices. The power management unit (PMU) is designed to simplify the external power interface. The power system can be split into the input power sources and their characteristics, the integrated power transforming and controlling elements, and the final load interconnection and requirements. By using the internal LDO regulators, the number of external supplies is greatly reduced.

The PMU driver provides the APIs to adjust the work condition of each regulator, and can gate the power of some modules.

Enumerations

enum  {
  kPMU_1P1RegulatorOutputOK = (1U << 0U),
  kPMU_1P1BrownoutOnOutput = (1U << 1U),
  kPMU_3P0RegulatorOutputOK = (1U << 2U),
  kPMU_3P0BrownoutOnOutput = (1U << 3U),
  kPMU_2P5RegulatorOutputOK = (1U << 4U),
  kPMU_2P5BrownoutOnOutput = (1U << 5U)
}
 PMU Status flags. More...
 
enum  pmu_1p1_weak_reference_source_t {
  kPMU_1P1WeakReferenceSourceAlt0 = 0U,
  kPMU_1P1WeakReferenceSourceAlt1 = 1U
}
 The source for the reference voltage of the weak 1P1 regulator. More...
 
enum  pmu_3p0_vbus_voltage_source_t {
  kPMU_3P0VBusVoltageSourceAlt0 = 0U,
  kPMU_3P0VBusVoltageSourceAlt1 = 1U
}
 Input voltage source for LDO_3P0 from USB VBus. More...
 
enum  pmu_core_reg_voltage_ramp_rate_t {
  kPMU_CoreRegVoltageRampRateFast = 0U,
  kPMU_CoreRegVoltageRampRateMediumFast = 1U,
  kPMU_CoreRegVoltageRampRateMediumSlow = 2U,
  kPMU_CoreRegVoltageRampRateSlow = 0U
}
 Regulator voltage ramp rate. More...
 
enum  pmu_power_bandgap_t {
  kPMU_NormalPowerBandgap = 0U,
  kPMU_LowPowerBandgap = 1U
}
 Bandgap select. More...
 

Driver version

#define FSL_PMU_DRIVER_VERSION   (MAKE_VERSION(2, 1, 1))
 PMU driver version. More...
 

Status.

uint32_t PMU_GetStatusFlags (PMU_Type *base)
 Get PMU status flags. More...
 

1P1 Regular

static void PMU_1P1SetWeakReferenceSource (PMU_Type *base, pmu_1p1_weak_reference_source_t option)
 Selects the source for the reference voltage of the weak 1P1 regulator. More...
 
static void PMU_1P1EnableWeakRegulator (PMU_Type *base, bool enable)
 Enables the weak 1P1 regulator. More...
 
static void PMU_1P1SetRegulatorOutputVoltage (PMU_Type *base, uint32_t value)
 Adjust the 1P1 regulator output voltage. More...
 
static void PMU_1P1SetBrownoutOffsetVoltage (PMU_Type *base, uint32_t value)
 Adjust the 1P1 regulator brownout offset voltage. More...
 
static void PMU_1P1EnablePullDown (PMU_Type *base, bool enable)
 Enable the pull-down circuitry in the regulator. More...
 
static void PMU_1P1EnableCurrentLimit (PMU_Type *base, bool enable)
 Enable the current-limit circuitry in the regulator. More...
 
static void PMU_1P1EnableBrownout (PMU_Type *base, bool enable)
 Enable the brownout circuitry in the regulator. More...
 
static void PMU_1P1EnableOutput (PMU_Type *base, bool enable)
 Enable the regulator output. More...
 

3P0 Regular

static void PMU_3P0SetRegulatorOutputVoltage (PMU_Type *base, uint32_t value)
 Adjust the 3P0 regulator output voltage. More...
 
static void PMU_3P0SetVBusVoltageSource (PMU_Type *base, pmu_3p0_vbus_voltage_source_t option)
 Select input voltage source for LDO_3P0. More...
 
static void PMU_3P0SetBrownoutOffsetVoltage (PMU_Type *base, uint32_t value)
 Adjust the 3P0 regulator brownout offset voltage. More...
 
static void PMU_3P0EnableCurrentLimit (PMU_Type *base, bool enable)
 Enable the current-limit circuitry in the 3P0 regulator. More...
 
static void PMU_3P0EnableBrownout (PMU_Type *base, bool enable)
 Enable the brownout circuitry in the 3P0 regulator. More...
 
static void PMU_3P0EnableOutput (PMU_Type *base, bool enable)
 Enable the 3P0 regulator output. More...
 

2P5 Regulator

static void PMU_2P5EnableWeakRegulator (PMU_Type *base, bool enable)
 Enables the weak 2P5 regulator. More...
 
static void PMU_2P5SetRegulatorOutputVoltage (PMU_Type *base, uint32_t value)
 Adjust the 1P1 regulator output voltage. More...
 
static void PMU_2P5SetBrownoutOffsetVoltage (PMU_Type *base, uint32_t value)
 Adjust the 2P5 regulator brownout offset voltage. More...
 
static void PMU_2P5EnablePullDown (PMU_Type *base, bool enable)
 Enable the pull-down circuitry in the 2P5 regulator. More...
 
static void PMU_2P1EnablePullDown (PMU_Type *base, bool enable)
 Enable the pull-down circuitry in the 2P5 regulator. More...
 
static void PMU_2P5EnableCurrentLimit (PMU_Type *base, bool enable)
 Enable the current-limit circuitry in the 2P5 regulator. More...
 
static void PMU_2P5nableBrownout (PMU_Type *base, bool enable)
 Enable the brownout circuitry in the 2P5 regulator. More...
 
static void PMU_2P5EnableOutput (PMU_Type *base, bool enable)
 Enable the 2P5 regulator output. More...
 

Core Regulator

static void PMU_CoreEnableIncreaseGateDrive (PMU_Type *base, bool enable)
 Increase the gate drive on power gating FETs. More...
 
static void PMU_CoreSetRegulatorVoltageRampRate (PMU_Type *base, pmu_core_reg_voltage_ramp_rate_t option)
 Set the CORE regulator voltage ramp rate. More...
 
static void PMU_CoreSetSOCDomainVoltage (PMU_Type *base, uint32_t value)
 Define the target voltage for the SOC power domain. More...
 
static void PMU_CoreSetARMCoreDomainVoltage (PMU_Type *base, uint32_t value)
 Define the target voltage for the ARM Core power domain. More...
 

Macro Definition Documentation

#define FSL_PMU_DRIVER_VERSION   (MAKE_VERSION(2, 1, 1))

Version 2.1.1.

Enumeration Type Documentation

anonymous enum
Enumerator
kPMU_1P1RegulatorOutputOK 

Status bit that signals when the 1p1 regulator output is ok.

1 = regulator output > brownout target.

kPMU_1P1BrownoutOnOutput 

Status bit that signals when a 1p1 brownout is detected on the regulator output.

kPMU_3P0RegulatorOutputOK 

Status bit that signals when the 3p0 regulator output is ok.

1 = regulator output > brownout target.

kPMU_3P0BrownoutOnOutput 

Status bit that signals when a 3p0 brownout is detected on the regulator output.

kPMU_2P5RegulatorOutputOK 

Status bit that signals when the 2p5 regulator output is ok.

1 = regulator output > brownout target.

kPMU_2P5BrownoutOnOutput 

Status bit that signals when a 2p5 brownout is detected on the regulator output.

Enumerator
kPMU_1P1WeakReferenceSourceAlt0 

Weak-linreg output tracks low-power-bandgap voltage.

kPMU_1P1WeakReferenceSourceAlt1 

Weak-linreg output tracks VDD_SOC_CAP voltage.

Enumerator
kPMU_3P0VBusVoltageSourceAlt0 

USB_OTG1_VBUS - Utilize VBUS OTG1 for power.

kPMU_3P0VBusVoltageSourceAlt1 

USB_OTG2_VBUS - Utilize VBUS OTG2 for power.

Enumerator
kPMU_CoreRegVoltageRampRateFast 

Fast.

kPMU_CoreRegVoltageRampRateMediumFast 

Medium Fast.

kPMU_CoreRegVoltageRampRateMediumSlow 

Medium Slow.

kPMU_CoreRegVoltageRampRateSlow 

Slow.

Enumerator
kPMU_NormalPowerBandgap 

Normal power bandgap.

kPMU_LowPowerBandgap 

Low power bandgap.

Function Documentation

uint32_t PMU_GetStatusFlags ( PMU_Type *  base)
Parameters
basePMU peripheral base address.
Returns
PMU status flags.It indicate if regulator output of 1P1,3P0 and 2P5 is ok and brownout output of 1P1,3P0 and 2P5 is detected.
static void PMU_1P1SetWeakReferenceSource ( PMU_Type *  base,
pmu_1p1_weak_reference_source_t  option 
)
inlinestatic
Parameters
basePMU peripheral base address.
optionThe option for reference voltage source, see to pmu_1p1_weak_reference_source_t.
static void PMU_1P1EnableWeakRegulator ( PMU_Type *  base,
bool  enable 
)
inlinestatic

This regulator can be used when the main 1P1 regulator is disabled, under low-power conditions.

Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_1P1SetRegulatorOutputVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Each LSB is worth 25mV. Programming examples are detailed below. Other output target voltages may be interpolated from these examples. Choices must be in this range:

  • 0x1b(1.375V) >= output_trg >= 0x04(0.8V)
  • 0x04 : 0.8V
  • 0x10 : 1.1V (typical)
  • 0x1b : 1.375V NOTE: There may be reduced chip functionality or reliability at the extremes of the programming range.
Parameters
basePMU peripheral base address.
valueSetting value for the output.
static void PMU_1P1SetBrownoutOffsetVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Control bits to adjust the regulator brownout offset voltage in 25mV steps. The reset brown-offset is 175mV below the programmed target code. Brownout target = OUTPUT_TRG - BO_OFFSET. Some steps may be irrelevant because of input supply limitations or load operation.

Parameters
basePMU peripheral base address.
valueSetting value for the brownout offset. The available range is in 3-bit.
static void PMU_1P1EnablePullDown ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_1P1EnableCurrentLimit ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_1P1EnableBrownout ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_1P1EnableOutput ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_3P0SetRegulatorOutputVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Each LSB is worth 25mV. Programming examples are detailed below. Other output target voltages may be interpolated from these examples. Choices must be in this range:

  • 0x00(2.625V) >= output_trg >= 0x1f(3.4V)
  • 0x00 : 2.625V
  • 0x0f : 3.0V (typical)
  • 0x1f : 3.4V
Parameters
basePMU peripheral base address.
valueSetting value for the output.
static void PMU_3P0SetVBusVoltageSource ( PMU_Type *  base,
pmu_3p0_vbus_voltage_source_t  option 
)
inlinestatic

Select input voltage source for LDO_3P0 from either USB_OTG1_VBUS or USB_OTG2_VBUS. If only one of the two VBUS voltages is present, it is automatically selected.

Parameters
basePMU peripheral base address.
optionUser-defined input voltage source for LDO_3P0.
static void PMU_3P0SetBrownoutOffsetVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Control bits to adjust the 3P0 regulator brownout offset voltage in 25mV steps. The reset brown-offset is 175mV below the programmed target code. Brownout target = OUTPUT_TRG - BO_OFFSET. Some steps may be irrelevant because of input supply limitations or load operation.

Parameters
basePMU peripheral base address.
valueSetting value for the brownout offset. The available range is in 3-bit.
static void PMU_3P0EnableCurrentLimit ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_3P0EnableBrownout ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_3P0EnableOutput ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_2P5EnableWeakRegulator ( PMU_Type *  base,
bool  enable 
)
inlinestatic

This low power regulator is used when the main 2P5 regulator is disabled to keep the 2.5V output roughly at 2.5V. Scales directly with the value of VDDHIGH_IN.

Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_2P5SetRegulatorOutputVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Each LSB is worth 25mV. Programming examples are detailed below. Other output target voltages may be interpolated from these examples. Choices must be in this range:

  • 0x00(2.1V) >= output_trg >= 0x1f(2.875V)
  • 0x00 : 2.1V
  • 0x10 : 2.5V (typical)
  • 0x1f : 2.875V NOTE: There may be reduced chip functionality or reliability at the extremes of the programming range.
Parameters
basePMU peripheral base address.
valueSetting value for the output.
static void PMU_2P5SetBrownoutOffsetVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Adjust the regulator brownout offset voltage in 25mV steps. The reset brown-offset is 175mV below the programmed target code. Brownout target = OUTPUT_TRG - BO_OFFSET. Some steps may be irrelevant because of input supply limitations or load operation.

Parameters
basePMU peripheral base address.
valueSetting value for the brownout offset. The available range is in 3-bit.
static void PMU_2P5EnablePullDown ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_2P1EnablePullDown ( PMU_Type *  base,
bool  enable 
)
inlinestatic
static void PMU_2P5EnableCurrentLimit ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_2P5nableBrownout ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_2P5EnableOutput ( PMU_Type *  base,
bool  enable 
)
inlinestatic
Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_CoreEnableIncreaseGateDrive ( PMU_Type *  base,
bool  enable 
)
inlinestatic

If set, increases the gate drive on power gating FETs to reduce leakage in the off state. Care must be taken to apply this bit only when the input supply voltage to the power FET is less than 1.1V. NOTE: This bit should only be used in low-power modes where the external input supply voltage is nominally 0.9V.

Parameters
basePMU peripheral base address.
enableEnable the feature or not.
static void PMU_CoreSetRegulatorVoltageRampRate ( PMU_Type *  base,
pmu_core_reg_voltage_ramp_rate_t  option 
)
inlinestatic
Parameters
basePMU peripheral base address.
optionUser-defined option for voltage ramp rate, see to pmu_core_reg_voltage_ramp_rate_t.
static void PMU_CoreSetSOCDomainVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Define the target voltage for the SOC power domain. Single-bit increments reflect 25mV core voltage steps. Some steps may not be relevant because of input supply limitations or load operation.

  • 0x00 : Power gated off.
  • 0x01 : Target core voltage = 0.725V
  • 0x02 : Target core voltage = 0.750V
  • ...
  • 0x10 : Target core voltage = 1.100V
  • ...
  • 0x1e : Target core voltage = 1.450V
  • 0x1F : Power FET switched full on. No regulation. NOTE: This register is capable of programming an over-voltage condition on the device. Consult the datasheet Operating Ranges table for the allowed voltages.
Parameters
basePMU peripheral base address.
valueSetting value for target voltage. 5-bit available
static void PMU_CoreSetARMCoreDomainVoltage ( PMU_Type *  base,
uint32_t  value 
)
inlinestatic

Define the target voltage for the ARM Core power domain. Single-bit increments reflect 25mV core voltage steps. Some steps may not be relevant because of input supply limitations or load operation.

  • 0x00 : Power gated off.
  • 0x01 : Target core voltage = 0.725V
  • 0x02 : Target core voltage = 0.750V
  • ...
  • 0x10 : Target core voltage = 1.100V
  • ...
  • 0x1e : Target core voltage = 1.450V
  • 0x1F : Power FET switched full on. No regulation. NOTE: This register is capable of programming an over-voltage condition on the device. Consult the datasheet Operating Ranges table for the allowed voltages.
Parameters
basePMU peripheral base address.
valueSetting value for target voltage. 5-bit available