Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

The Power Management Controller (PMC) contains the internal voltage regulator, power on reset (POR), and low voltage detect system.

The PMC HAL driver provides these APIs:

The low voltage detection can be configured by these functions: PMC_HAL_LowVoltDetectConfig() and PMC_HAL_LowVoltWarnConfig().
Use the function PMC_HAL_GetLowVoltDetectFlag()/PMC_HAL_GetLowVoltWarnFlag() to check the low voltage detection state. Use the function PMC_HAL_SetLowVoltDetectAck()/PMC_HAL_SetLowVoltWarnAck() to clear the flags.
To configure the band gap, use the PMC_HAL_BandgapBufferConfig()function. For I/O latch state, use the PMC_HAL_GetAckIsolation()/PMC_HAL_ClearAckIsolation() function.

Files

file  fsl_pmc_hal.h
 

Data Structures

struct  pmc_bandgap_buffer_config_t
 Bandgap Buffer configuration. More...
 

Enumerations

enum  pmc_low_volt_warn_volt_select_t {
  kPmcLowVoltWarnVoltLowTrip,
  kPmcLowVoltWarnVoltMid1Trip,
  kPmcLowVoltWarnVoltMid2Trip,
  kPmcLowVoltWarnVoltHighTrip
}
 Low-Voltage Warning Voltage Select. More...
 
enum  pmc_low_volt_detect_volt_select_t {
  kPmcLowVoltDetectVoltLowTrip,
  kPmcLowVoltDetectVoltHighTrip
}
 Low-Voltage Detect Voltage Select. More...
 

Power Management Controller Control APIs

static void PMC_HAL_LowVoltDetectConfig (PMC_Type *base, bool enableInt, bool enableReset, pmc_low_volt_detect_volt_select_t voltSelect)
 Configure the low voltage detect setting. More...
 
static void PMC_HAL_SetLowVoltDetectAck (PMC_Type *base)
 Low-Voltage Detect Acknowledge. More...
 
static bool PMC_HAL_GetLowVoltDetectFlag (PMC_Type *base)
 Low-Voltage Detect Flag Read. More...
 
static void PMC_HAL_LowVoltWarnConfig (PMC_Type *base, bool enableInt, pmc_low_volt_warn_volt_select_t voltSelect)
 Configure the low voltage warning setting. More...
 
static void PMC_HAL_SetLowVoltWarnAck (PMC_Type *base)
 Low-Voltage Warning Acknowledge. More...
 
static bool PMC_HAL_GetLowVoltWarnFlag (PMC_Type *base)
 Low-Voltage Warning Flag Read. More...
 
static void PMC_HAL_BandgapBufferConfig (PMC_Type *base, pmc_bandgap_buffer_config_t *config)
 Configures the PMC bandgap. More...
 
static uint8_t PMC_HAL_GetAckIsolation (PMC_Type *base)
 Gets the acknowledge isolation value. More...
 
static void PMC_HAL_ClearAckIsolation (PMC_Type *base)
 Clears an acknowledge isolation. More...
 
static uint8_t PMC_HAL_GetRegulatorStatus (PMC_Type *base)
 Gets the Regulator regulation status. More...
 

Data Structure Documentation

struct pmc_bandgap_buffer_config_t

Data Fields

bool enable
 Enable bandgap buffer. More...
 

Field Documentation

bool pmc_bandgap_buffer_config_t::enable

Enumeration Type Documentation

Enumerator
kPmcLowVoltWarnVoltLowTrip 

Low trip point selected (VLVW = VLVW1)

kPmcLowVoltWarnVoltMid1Trip 

Mid 1 trip point selected (VLVW = VLVW2)

kPmcLowVoltWarnVoltMid2Trip 

Mid 2 trip point selected (VLVW = VLVW3)

kPmcLowVoltWarnVoltHighTrip 

High trip point selected (VLVW = VLVW4)

Enumerator
kPmcLowVoltDetectVoltLowTrip 

Low trip point selected (V LVD = V LVDL )

kPmcLowVoltDetectVoltHighTrip 

High trip point selected (V LVD = V LVDH )

Function Documentation

static void PMC_HAL_LowVoltDetectConfig ( PMC_Type *  base,
bool  enableInt,
bool  enableReset,
pmc_low_volt_detect_volt_select_t  voltSelect 
)
inlinestatic

This function configures the low voltage detect setting, including the trip point voltage setting, enable interrupt or not, enable MCU reset or not.

Parameters
baseBase address for current PMC instance.
enableIntEnable interrupt or not when low voltage detect.
enableResetEnable MCU reset or not when low voltage detect.
voltSelectLow voltage detect trip point voltage.
static void PMC_HAL_SetLowVoltDetectAck ( PMC_Type *  base)
inlinestatic

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

Parameters
baseBase address for current PMC instance.
static bool PMC_HAL_GetLowVoltDetectFlag ( PMC_Type *  base)
inlinestatic

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

Parameters
baseBase address for current PMC instance.
Returns
Current low voltage detect flag
  • true: Low-Voltage detected
  • false: Low-Voltage not detected
static void PMC_HAL_LowVoltWarnConfig ( PMC_Type *  base,
bool  enableInt,
pmc_low_volt_warn_volt_select_t  voltSelect 
)
inlinestatic

This function configures the low voltage warning setting, including the trip point voltage setting and enable interrupt or not.

Parameters
baseBase address for current PMC instance.
enableIntEnable interrupt or not when low voltage detect.
voltSelectLow voltage detect trip point voltage.
static void PMC_HAL_SetLowVoltWarnAck ( PMC_Type *  base)
inlinestatic

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

Parameters
baseBase address for current PMC instance.
static bool PMC_HAL_GetLowVoltWarnFlag ( 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
baseBase address for current PMC instance.
Returns
Current LVWF status
  • true: Low-Voltage Warning Flag is set.
  • false: the Low-Voltage Warning does not happen.
static void PMC_HAL_BandgapBufferConfig ( PMC_Type *  base,
pmc_bandgap_buffer_config_t config 
)
inlinestatic

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

Parameters
baseBase address for current PMC instance.
configPointer to the configuration.
static uint8_t PMC_HAL_GetAckIsolation ( 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
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_HAL_ClearAckIsolation ( 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
baseBase address for current PMC instance.
static uint8_t PMC_HAL_GetRegulatorStatus ( PMC_Type *  base)
inlinestatic

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

Parameters
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.