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

Data Structures

struct  pmc_version_id_t
 IP version ID definition. More...
 
struct  pmc_param_t
 IP parameter definition. More...
 
struct  pmc_low_volt_detect_config_t
 Low-voltage Detect Configuration Structure. More...
 
struct  pmc_low_volt_warning_config_t
 Low-voltage Warning Configuration Structure. More...
 
struct  pmc_high_volt_detect_config_t
 High-voltage Detect Configuration Structure. More...
 
struct  pmc_bandgap_buffer_config_t
 Bandgap Buffer configuration. More...
 

Enumerations

enum  pmc_low_volt_detect_volt_select_t {
  kPMC_LowVoltDetectLowTrip = 0U,
  kPMC_LowVoltDetectHighTrip = 1U
}
 Low-voltage Detect Voltage Select. More...
 
enum  pmc_low_volt_warning_volt_select_t {
  kPMC_LowVoltWarningLowTrip = 0U,
  kPMC_LowVoltWarningMid1Trip = 1U,
  kPMC_LowVoltWarningMid2Trip = 2U,
  kPMC_LowVoltWarningHighTrip = 3U
}
 Low-voltage Warning Voltage Select. More...
 
enum  pmc_high_volt_detect_volt_select_t {
  kPMC_HighVoltDetectLowTrip = 0U,
  kPMC_HighVoltDetectHighTrip = 1U
}
 High-voltage Detect Voltage Select. More...
 
enum  pmc_vlp_freq_mode_t {
  kPMC_FreqRestrict = 0U,
  kPMC_FreqUnrestrict = 1U
}
 VLPx Option. More...
 

Driver version

#define FSL_PMC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))
 PMC driver version. More...
 

Power Management Controller Control APIs

static void PMC_GetVersionId (PMC_Type *base, pmc_version_id_t *versionId)
 Gets the PMC version ID. More...
 
void PMC_GetParam (PMC_Type *base, pmc_param_t *param)
 Gets the PMC parameter. More...
 
void PMC_ConfigureLowVoltDetect (PMC_Type *base, const pmc_low_volt_detect_config_t *config)
 Configures the low-voltage detect setting. More...
 
static bool PMC_GetLowVoltDetectFlag (PMC_Type *base)
 Gets the Low-voltage Detect Flag status. More...
 
static void PMC_ClearLowVoltDetectFlag (PMC_Type *base)
 Acknowledges clearing the Low-voltage Detect flag. More...
 
void PMC_ConfigureLowVoltWarning (PMC_Type *base, const pmc_low_volt_warning_config_t *config)
 Configures the low-voltage warning setting. More...
 
static bool PMC_GetLowVoltWarningFlag (PMC_Type *base)
 Gets the Low-voltage Warning Flag status. More...
 
static void PMC_ClearLowVoltWarningFlag (PMC_Type *base)
 Acknowledges the Low-voltage Warning flag. More...
 
void PMC_ConfigureHighVoltDetect (PMC_Type *base, const pmc_high_volt_detect_config_t *config)
 Configures the high-voltage detect setting. More...
 
static bool PMC_GetHighVoltDetectFlag (PMC_Type *base)
 Gets the High-voltage Detect Flag status. More...
 
static void PMC_ClearHighVoltDetectFlag (PMC_Type *base)
 Acknowledges clearing the High-voltage Detect flag. More...
 
void PMC_ConfigureBandgapBuffer (PMC_Type *base, const pmc_bandgap_buffer_config_t *config)
 Configures the PMC bandgap. More...
 
static bool PMC_GetPeriphIOIsolationFlag (PMC_Type *base)
 Gets the acknowledge Peripherals and I/O pads isolation flag. More...
 
static void PMC_ClearPeriphIOIsolationFlag (PMC_Type *base)
 Acknowledges the isolation flag to Peripherals and I/O pads. More...
 
static bool PMC_IsRegulatorInRunRegulation (PMC_Type *base)
 Gets the regulator regulation status. More...
 

Detailed Description

The MCUXpresso SDK provides a peripheral driver for the Power Management Controller (PMC) module of MCUXpresso SDK devices. The PMC module contains internal voltage regulator, power on reset, low-voltage detect system, and high-voltage detect system.


Data Structure Documentation

struct pmc_version_id_t

Data Fields

uint16_t feature
 Feature Specification Number. More...
 
uint8_t minor
 Minor version number. More...
 
uint8_t major
 Major version number. More...
 

Field Documentation

uint16_t pmc_version_id_t::feature
uint8_t pmc_version_id_t::minor
uint8_t pmc_version_id_t::major
struct pmc_param_t

Data Fields

bool vlpoEnable
 VLPO enable. More...
 
bool hvdEnable
 HVD enable. More...
 

Field Documentation

bool pmc_param_t::vlpoEnable
bool pmc_param_t::hvdEnable
struct pmc_low_volt_detect_config_t

Data Fields

bool enableInt
 Enable interrupt when Low-voltage detect.
 
bool enableReset
 Enable system reset when Low-voltage detect.
 
pmc_low_volt_detect_volt_select_t voltSelect
 Low-voltage detect trip point voltage selection.
 
struct pmc_low_volt_warning_config_t

Data Fields

bool enableInt
 Enable interrupt when low-voltage warning.
 
pmc_low_volt_warning_volt_select_t voltSelect
 Low-voltage warning trip point voltage selection.
 
struct pmc_high_volt_detect_config_t

Data Fields

bool enableInt
 Enable interrupt when high-voltage detect.
 
bool enableReset
 Enable system reset when high-voltage detect.
 
pmc_high_volt_detect_volt_select_t voltSelect
 High-voltage detect trip point voltage selection.
 
struct pmc_bandgap_buffer_config_t

Data Fields

bool enable
 Enable bandgap buffer. More...
 
bool enableInLowPowerMode
 Enable bandgap buffer in low-power mode. More...
 

Field Documentation

bool pmc_bandgap_buffer_config_t::enable
bool pmc_bandgap_buffer_config_t::enableInLowPowerMode

Macro Definition Documentation

#define FSL_PMC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))

Version 2.0.2.

Enumeration Type Documentation

Enumerator
kPMC_LowVoltDetectLowTrip 

Low-trip point selected (VLVD = VLVDL )

kPMC_LowVoltDetectHighTrip 

High-trip point selected (VLVD = VLVDH )

Enumerator
kPMC_LowVoltWarningLowTrip 

Low-trip point selected (VLVW = VLVW1)

kPMC_LowVoltWarningMid1Trip 

Mid 1 trip point selected (VLVW = VLVW2)

kPMC_LowVoltWarningMid2Trip 

Mid 2 trip point selected (VLVW = VLVW3)

kPMC_LowVoltWarningHighTrip 

High-trip point selected (VLVW = VLVW4)

Enumerator
kPMC_HighVoltDetectLowTrip 

Low-trip point selected (VHVD = VHVDL )

kPMC_HighVoltDetectHighTrip 

High-trip point selected (VHVD = VHVDH )

Enumerator
kPMC_FreqRestrict 

Frequency is restricted in VLPx mode.

kPMC_FreqUnrestrict 

Frequency is unrestricted in VLPx mode.

Function Documentation

static void PMC_GetVersionId ( PMC_Type *  base,
pmc_version_id_t versionId 
)
inlinestatic

This function gets the PMC version ID, including major version number, minor version number, and a feature specification number.

Parameters
basePMC peripheral base address.
versionIdPointer to version ID structure.
void PMC_GetParam ( PMC_Type *  base,
pmc_param_t param 
)

This function gets the PMC parameter including the VLPO enable and the HVD enable.

Parameters
basePMC peripheral base address.
paramPointer to PMC param structure.
void PMC_ConfigureLowVoltDetect ( PMC_Type *  base,
const pmc_low_volt_detect_config_t config 
)

This function configures the low-voltage detect setting, including the trip point voltage setting, enables or disables the interrupt, enables or disables the system reset.

Parameters
basePMC peripheral base address.
configLow-voltage detect configuration structure.
static bool PMC_GetLowVoltDetectFlag ( PMC_Type *  base)
inlinestatic

This function reads the current LVDF status. If it returns 1, a low-voltage event is detected.

Parameters
basePMC peripheral base address.
Returns
Current low-voltage detect flag
  • true: Low-voltage detected
  • false: Low-voltage not detected
static void PMC_ClearLowVoltDetectFlag ( PMC_Type *  base)
inlinestatic

This function acknowledges the low-voltage detection errors (write 1 to clear LVDF).

Parameters
basePMC peripheral base address.
void PMC_ConfigureLowVoltWarning ( PMC_Type *  base,
const pmc_low_volt_warning_config_t config 
)

This function configures the low-voltage warning setting, including the trip point voltage setting and enabling or disabling the interrupt.

Parameters
basePMC peripheral base address.
configLow-voltage warning configuration structure.
static bool PMC_GetLowVoltWarningFlag ( PMC_Type *  base)
inlinestatic

This function polls the current LVWF status. When 1 is returned, it indicates a low-voltage warning event. LVWF is set when V Supply transitions below the trip point or after reset and V Supply is already below the V LVW.

Parameters
basePMC peripheral base address.
Returns
Current LVWF status
  • true: Low-voltage Warning Flag is set.
  • false: the Low-voltage Warning does not happen.
static void PMC_ClearLowVoltWarningFlag ( PMC_Type *  base)
inlinestatic

This function acknowledges the low voltage warning errors (write 1 to clear LVWF).

Parameters
basePMC peripheral base address.
void PMC_ConfigureHighVoltDetect ( PMC_Type *  base,
const pmc_high_volt_detect_config_t config 
)

This function configures the high-voltage detect setting, including the trip point voltage setting, enabling or disabling the interrupt, enabling or disabling the system reset.

Parameters
basePMC peripheral base address.
configHigh-voltage detect configuration structure.
static bool PMC_GetHighVoltDetectFlag ( PMC_Type *  base)
inlinestatic

This function reads the current HVDF status. If it returns 1, a low voltage event is detected.

Parameters
basePMC peripheral base address.
Returns
Current high-voltage detect flag
  • true: High-voltage detected
  • false: High-voltage not detected
static void PMC_ClearHighVoltDetectFlag ( PMC_Type *  base)
inlinestatic

This function acknowledges the high-voltage detection errors (write 1 to clear HVDF).

Parameters
basePMC peripheral base address.
void PMC_ConfigureBandgapBuffer ( PMC_Type *  base,
const pmc_bandgap_buffer_config_t config 
)

This function configures the PMC bandgap, including the drive select and behavior in low-power mode.

Parameters
basePMC peripheral base address.
configPointer to the configuration structure
static bool PMC_GetPeriphIOIsolationFlag ( PMC_Type *  base)
inlinestatic

This function reads the Acknowledge Isolation setting that indicates whether certain peripherals and the I/O pads are in a latched state as a result of having been in the VLLS mode.

Parameters
basePMC peripheral base address.
baseBase address for current PMC instance.
Returns
ACK isolation 0 - Peripherals and I/O pads are in a normal run state. 1 - Certain peripherals and I/O pads are in an isolated and latched state.
static void PMC_ClearPeriphIOIsolationFlag ( PMC_Type *  base)
inlinestatic

This function clears the ACK Isolation flag. Writing one to this setting when it is set releases the I/O pads and certain peripherals to their normal run mode state.

Parameters
basePMC peripheral base address.
static bool PMC_IsRegulatorInRunRegulation ( PMC_Type *  base)
inlinestatic

This function returns the regulator to run a regulation status. It provides the current status of the internal voltage regulator.

Parameters
basePMC peripheral base address.
baseBase address for current PMC instance.
Returns
Regulation status 0 - Regulator is in a stop regulation or in transition to/from the regulation. 1 - Regulator is in a run regulation.