| Kinetis SDK v.2.0 API Reference Manual Rev. 0 Freescale Semiconductor, Inc.

- Main Page
- Related Pages
- API Reference

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Files | Data Structures
PMC: Power Management Controller

## Overview

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

## Files
file | fsl_pmc.h

## Data Structures
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...

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

## Power Management Controller Control APIs
void | PMC_ConfigureLowVoltDetect (PMC_Type *base, const pmc_low_volt_detect_config_t *config)
| Configure the low voltage detect setting. More...
static bool | PMC_GetLowVoltDetectFlag (PMC_Type *base)
| Get Low-Voltage Detect Flag status. More...
static void | PMC_ClearLowVoltDetectFlag (PMC_Type *base)
| Acknowledge to clear the Low-Voltage Detect flag. More...
void | PMC_ConfigureLowVoltWarning (PMC_Type *base, const pmc_low_volt_warning_config_t *config)
| Configure the low voltage warning setting. More...
static bool | PMC_GetLowVoltWarningFlag (PMC_Type *base)
| Get Low-Voltage Warning Flag status. More...
static void | PMC_ClearLowVoltWarningFlag (PMC_Type *base)
| Acknowledge to Low-Voltage Warning flag. More...

## Data Structure Documentation

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.

struct pmc_low_volt_warning_config_t

### Data Fields
bool | enableInt
| Enable interrupt when low voltage warning.

## Macro Definition Documentation

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

Version 2.0.0.

## Function Documentation

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, enable interrupt or not, enable system reset or not.

Parameters

  base | PMC peripheral base address.
  config | Low-Voltage detect configuration structure.

static bool PMC_GetLowVoltDetectFlag | ( | PMC_Type * | base | ) |
| inline static

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

Parameters

  base | PMC 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 | ) |
| inline static

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

Parameters

  base | PMC 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 enable interrupt or not.

Parameters

  base | PMC peripheral base address.
  config | Low-Voltage warning configuration structure.

static bool PMC_GetLowVoltWarningFlag | ( | PMC_Type * | base | ) |
| inline static

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

  base | PMC 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 | ) |
| inline static

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

Parameters

  base | PMC peripheral base address.