| Kinetis SDK API Reference Manual 1.0.0-beta Freescale Semiconductor, Inc.

- Introduction
- Related Pages
- API Usage

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Enumerations
SMC Peripheral Driver
System Mode Controller (SMC)

The section describes the programming interface of the SMC Peripheral driver. More...

## Data Structures
struct | smc_power_mode_config_t
| Power mode control configuration used for calling the smc_set_power_mode API. More...

## Enumerations
enum | power_modes_t { kPowerModeRun, kPowerModeWait, kPowerModeStop, kPowerModeVlpr, kPowerModeVlpw, kPowerModeVlps, kPowerModeLls, kPowerModeVlls, kPowerModeMax }
| Power Modes.
enum | smc_manager_error_code_t { kSmcManagerSuccess, kSmcManagerNoSuchModeName, kSmcManagerAlreadyInTheState, kSmcManagerFailed }
| Error code definition for the system mode controller manager APIs. More...

## Power Mode Configuration
smc_manager_error_code_t | smc_set_power_mode (const smc_power_mode_config_t *powerModeConfig)
| Configures the power mode. More...

### SMC Peripheral Driver

# Overview

The System Mode Controller (SMC) manager provides wrapper functions to access SMC HAL layer APIs.It also provides a set of functions to configure the power mode protection, the power mode, and other configuration settings.

# Power Mode Configuration APIs

- Power Mode Protection configurations APIs Allow the Very Low Power mode / Read the current mode Allow the Low Leakage Stop mode / Read the current mode Allow the Very Low Leakage Stop mode / Read the current mode
- Power Mode Control configurations APIs
- VLLS Mode Control configurations APIs
- Power Mode Status APIs

This is an example of the SMC manager APIs.
#include "fsl_smc_manager.h"
// set power mode to normal Run mode
power_mode_config(kRun, false);
// set power mode to VLPS Stop mode
power_mode_config(kVlps, false);

## Data Structure Documentation

struct smc_power_mode_config_t

### Data Fields
power_modes_t | powerModeName
| Power mode(enum), see power_modes_t.
smc_stop_submode_t | stopSubMode
| Stop submode(enum), see smc_stop_submode_t.
bool | lpwuiOption
| If LPWUI option is needed.
smc_lpwui_option_t | lpwuiOptionValue
| LPWUI option(enum), see smc_lpwui_option_t.
bool | porOption
| If POR option is needed.
smc_por_option_t | porOptionValue
| POR option(enum), see smc_por_option_t.

## Enumeration Type Documentation

enum smc_manager_error_code_t

Enumerator
kSmcManagerSuccess | Success.
kSmcManagerNoSuchModeName | Cannot find the mode name specified.
kSmcManagerAlreadyInTheState | Already in the required state.
kSmcManagerFailed | Unknown error, operation failed.

## Function Documentation

smc_manager_error_code_t smc_set_power_mode | ( | const smc_power_mode_config_t * | powerModeConfig | ) |

This function configures the power mode control for both run, stop, and stop sub mode if needed. Also it configures the power options for a specific power mode. An application should follow the proper procedure to configure and switch power modes between different run and stop modes. For proper procedures and supported power modes, see an appropriate chip reference manual. See the smc_power_mode_config_t for required parameters to configure the power mode and the supported options. Other options may need to be individually configured through the HAL driver. See the HAL driver header file for details.

Parameters

  powerModeConfig | Power mode configuration structure smc_power_mode_config_t