Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_smc_hal.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#include "fsl_device_registers.h"

Data Structures

struct  smc_power_mode_config_t
 Power mode control configuration used for calling the SMC_SYS_SetPowerMode API. More...
 

Enumerations

enum  power_modes_t {
  kPowerModeRun = 0x01U << 0U,
  kPowerModeWait = 0x01U << 1U,
  kPowerModeStop = 0x01U << 2U,
  kPowerModeVlpr = 0x01U << 3U,
  kPowerModeVlpw = 0x01U << 4U,
  kPowerModeVlps = 0x01U << 5U,
  kPowerModeLls = 0x01U << 6U,
  kPowerModeVlls = 0x01U << 7U,
  kPowerModeHsrun = 0x01U << 8U,
  kPowerModeMax = 0x01U << 9U
}
 Power Modes.
 
enum  smc_hal_error_code_t {
  kSmcHalSuccess,
  kSmcHalNoSuchModeName,
  kSmcHalAlreadyInTheState,
  kSmcHalFailed
}
 Error code definition for the system mode controller manager APIs. More...
 
enum  power_mode_stat_t {
  kStatRun = 0x01U,
  kStatStop = 0x02U,
  kStatVlpr = 0x04U,
  kStatVlpw = 0x08U,
  kStatVlps = 0x10U,
  kStatVlls = 0x40U
}
 Power Modes in PMSTAT. More...
 
enum  power_modes_protect_t {
  kAllowPowerModeVlls = SMC_PMPROT_AVLLS_MASK,
  kAllowPowerModeVlp = SMC_PMPROT_AVLP_MASK,
  kAllowPowerModeAll
}
 Power Modes Protection. More...
 
enum  smc_run_mode_t {
  kSmcRun,
  kSmcReservedRun,
  kSmcVlpr
}
 Run mode definition. More...
 
enum  smc_stop_mode_t {
  kSmcStop = 0U,
  kSmcReservedStop1 = 1U,
  kSmcVlps = 2U,
  kSmcVlls = 4U
}
 Stop mode definition. More...
 
enum  smc_stop_submode_t {
  kSmcStopSub0,
  kSmcStopSub1,
  kSmcStopSub2,
  kSmcStopSub3
}
 VLLS/LLS stop sub mode definition. More...
 
enum  smc_lpwui_option_t {
  kSmcLpwuiDisabled,
  kSmcLpwuiEnabled
}
 Low Power Wake Up on Interrupt option. More...
 
enum  smc_pstop_option_t {
  kSmcPstopStop,
  kSmcPstopStop1,
  kSmcPstopStop2,
  kSmcPstopReserved
}
 Partial STOP option. More...
 
enum  smc_por_option_t {
  kSmcPorEnabled,
  kSmcPorDisabled
}
 POR option. More...
 
enum  smc_ram2_option_t {
  kSmcRam2DisPowered,
  kSmcRam2Powered
}
 RAM2 power option. More...
 
enum  smc_lpo_option_t {
  kSmcLpoEnabled,
  kSmcLpoDisabled
}
 LPO power option. More...
 

Functions

System mode controller APIs
smc_hal_error_code_t SMC_HAL_SetMode (SMC_Type *base, const smc_power_mode_config_t *powerModeConfig)
 Configures the power mode. More...
 
static void SMC_HAL_SetProtection (SMC_Type *base, uint8_t allowedModes)
 Configures all power mode protection settings. More...
 
static uint8_t SMC_HAL_GetProtection (SMC_Type *base, uint8_t modes)
 Gets the power mode protection setting. More...
 
static bool SMC_HAL_IsStopAbort (SMC_Type *base)
 Checks whether the previous stop mode entry was successful. More...
 
power_mode_stat_t SMC_HAL_GetStat (SMC_Type *base)
 Gets the current power mode status. More...