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.
|
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...
|
|
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.
|
uint32_t PMU_GetStatusFlags |
( |
PMU_Type * |
base | ) |
|
- Parameters
-
base | PMU 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_1P1EnableWeakRegulator |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
This regulator can be used when the main 1P1 regulator is disabled, under low-power conditions.
- Parameters
-
base | PMU peripheral base address. |
enable | Enable 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
-
base | PMU peripheral base address. |
value | Setting 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
-
base | PMU peripheral base address. |
value | Setting value for the brownout offset. The available range is in 3-bit. |
static void PMU_1P1EnablePullDown |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
static void PMU_1P1EnableCurrentLimit |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
static void PMU_1P1EnableBrownout |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
static void PMU_1P1EnableOutput |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable 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
-
base | PMU peripheral base address. |
value | Setting value for the output. |
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
-
base | PMU peripheral base address. |
option | User-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
-
base | PMU peripheral base address. |
value | Setting value for the brownout offset. The available range is in 3-bit. |
static void PMU_3P0EnableCurrentLimit |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
static void PMU_3P0EnableBrownout |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
static void PMU_3P0EnableOutput |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable 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
-
base | PMU peripheral base address. |
enable | Enable 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
-
base | PMU peripheral base address. |
value | Setting 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
-
base | PMU peripheral base address. |
value | Setting value for the brownout offset. The available range is in 3-bit. |
static void PMU_2P5EnablePullDown |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable 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
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
static void PMU_2P5nableBrownout |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
static void PMU_2P5EnableOutput |
( |
PMU_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | PMU peripheral base address. |
enable | Enable 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
-
base | PMU peripheral base address. |
enable | Enable the feature or not. |
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
-
base | PMU peripheral base address. |
value | Setting 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
-
base | PMU peripheral base address. |
value | Setting value for target voltage. 5-bit available |