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

Read Guidance

This document consists of sections titled with Driver Overview, Data Structures, Enumerations, Functions, etc., each with an overview list and detailed documentation. It is recommended to read the Driver Overview first for it includes a comprehensive description of the peripheral, driver and driver changes. Other sections give detailed information for APIs, enums, macros, etc., for your further reference.

Driver Overview

 PMC Peripheral and Driver Overview
 Content including 1) peripheral features, work logic and work method; 2) driver design logic and use method; 3) typical use case.
 
 The Driver Change Log
 The current PMC driver version is 2.0.0.
 

Enumerations

enum  _pmc_interrupt_enable {
  kPMC_2P2VLowVoltageInterruptEnable = PMC_CTRL_LV22IE_MASK,
  kPMC_2P7VLowVoltageInterruptEnable = PMC_CTRL_LV27IE_MASK,
  kPMC_2P2VHighVoltageInterruptEnable = PMC_CTRL_HV22IE_MASK,
  kPMC_2P7VHighVoltageInterruptEnable = PMC_CTRL_HV27IE_MASK
}
 The enumeration of PMC voltage detection interrupts. More...
 
enum  _pmc_status_flags {
  kPMC_SmallRegulator2P7VActiveFlag = PMC_STS_SR27_MASK,
  kPMC_LowVoltageInterruptFlag = PMC_STS_LVI_MASK,
  kPMC_Sticky2P7VLowVoltageFlag = PMC_STS_SLV27F_MASK,
  kPMC_Sticky2P2VLowVoltageFlag = PMC_STS_SLV22F_MASK,
  kPMC_2P7VLowVoltageFlag = PMC_STS_LV27F_MASK,
  kPMC_2P2VLowVoltageFlag = PMC_STS_LV22F_MASK
}
 The enumeration of PMC status flags. More...
 

Bandgap Control Interfaces

static void PMC_SetBandgapTrim (PMC_Type *base, uint8_t u8TrimValue)
 Sets the trim value of the bandgap reference in the regulator. More...
 
static void PMC_EnableVoltageReferenceBuffer (PMC_Type *base, bool bEnable)
 Enables/Disables a buffer that drivers the 1.2V bandgap reference to the ADC. More...
 

Interrupts Control Interfaces

static void PMC_EnableInterrupts (PMC_Type *base, uint16_t u16Interrupts)
 Enables the interrups, including 2.2V high voltage interrupt, 2.7V high voltage interrupt, 2.2V low voltage interrupt, 2.7V low voltage interrupt. More...
 
static void PMC_DisableInterrupts (PMC_Type *base, uint16_t u16Interrupts)
 Disables the interrups, including 2.2V high voltage interrupt, 2.7V high voltage interrupt, 2.2V low voltage interrupt, 2.7V low voltage interrupt. More...
 

Status Flags Inferfaces

static uint16_t PMC_GetStatusFlags (PMC_Type *base)
 Gets the status flags of PMC module, such as low voltage interrpt flag, small regulator 2.7 active flag, etc. More...
 
static void PMC_ClearStatusFlags (PMC_Type *base, uint16_t u16StatusFlags)
 Clears the status flags of PMC module, only low voltage interrupt flag, sticky 2.7V low voltage flag, and sticky 2.2V low voltage flag can be cleared. More...
 

Enumeration Type Documentation

Enumerator
kPMC_2P2VLowVoltageInterruptEnable 

If the input supply is currently dropped below the 2.2V level, generate the low voltage interrupt.

kPMC_2P7VLowVoltageInterruptEnable 

If the input supply is currently dropped below the 2.7V level, generate the low voltage interrupt.

kPMC_2P2VHighVoltageInterruptEnable 

If the input supply is currently raised above the 2.2V level, generate the low voltage interrupt.

kPMC_2P7VHighVoltageInterruptEnable 

If the input supply is currently raised above the 2.2V level, generate the low voltage interrupt.

Enumerator
kPMC_SmallRegulator2P7VActiveFlag 

The small regulator 2.7V supply is ready to be used.

kPMC_LowVoltageInterruptFlag 

The low voltage interrupt flag, used to indicate whether the low voltage interrupt is asserted.

kPMC_Sticky2P7VLowVoltageFlag 

Input supply has dropped below the 2.7V threshold.

This sticky flag indicates that the input supply dropped below the 2.7V level at some point.

kPMC_Sticky2P2VLowVoltageFlag 

Input supply has dropped below the 2.2V threshold.

This sticky flag indicates that the input supply dropped below the 2.2V threshold at some point.

kPMC_2P7VLowVoltageFlag 

Input supply is below the 2.7V threshold.

kPMC_2P2VLowVoltageFlag 

Input supply is below the 2.2V threshold.

Function Documentation

static void PMC_SetBandgapTrim ( PMC_Type *  base,
uint8_t  u8TrimValue 
)
inlinestatic
Parameters
basePMC peripheral base address.
u8TrimValueThe bandgap's trim value, ranges from 0 to 15.
static void PMC_EnableVoltageReferenceBuffer ( PMC_Type *  base,
bool  bEnable 
)
inlinestatic

If the users want to calibrate the ADC using the 1.2V reference voltage, then the voltage reference buffer should be enabled. When ADC calibration is not being performed, the voltage reference buffer should be disabled to save power.

Parameters
basePMC peripheral base address.
bEnableUsed to control the behaviour of voltage reference buffer.
  • true Enable voltage reference buffer.
  • false Disable voltage reference buffer.
static void PMC_EnableInterrupts ( PMC_Type *  base,
uint16_t  u16Interrupts 
)
inlinestatic
Parameters
basePMC peripheral base address.
u16InterruptsThe interupts to be enabled, should be the OR'ed value of _pmc_interrupt_enable.
static void PMC_DisableInterrupts ( PMC_Type *  base,
uint16_t  u16Interrupts 
)
inlinestatic
Parameters
basePMC peripheral base address.
u16InterruptsThe interupts to be disabled, should be the OR'ed value of _pmc_interrupt_enable.
static uint16_t PMC_GetStatusFlags ( PMC_Type *  base)
inlinestatic
Parameters
basePMC peripheral base address.
Returns
The status flags of PMC module, should be the OR'ed value of _pmc_status_flags.
static void PMC_ClearStatusFlags ( PMC_Type *  base,
uint16_t  u16StatusFlags 
)
inlinestatic
Parameters
basePMC peripheral base address.
u16StatusFlagsThe status flags to be cleared, should be the OR'ed value of kPMC_LowVoltageInterruptFlag, kPMC_Sticky2P7VLowVoltageFlag, and kPMC_Sticky2P2VLowVoltageFlag.