Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

Smc

Data Structures

struct  _smc_version_id
 IP version ID definition. More...
struct  _smc_param
 IP parameter definition. More...
struct  _smc_power_mode_lls_config
 SMC Low-Leakage Stop power mode configuration. More...
struct  _smc_power_mode_vlls_config
 SMC Very Low-Leakage Stop power mode configuration. More...

Typedefs

typedef enum
_smc_power_mode_protection 
smc_power_mode_protection_t
 Power Modes Protection.
typedef enum _smc_power_state smc_power_state_t
 Power Modes in PMSTAT.
typedef enum _smc_run_mode smc_run_mode_t
 Run mode definition.
typedef enum _smc_stop_mode smc_stop_mode_t
 Stop mode definition.
typedef enum _smc_stop_submode smc_stop_submode_t
 VLLS/LLS stop sub mode definition.
typedef enum _smc_partial_stop_mode smc_partial_stop_option_t
 Partial STOP option.
typedef struct _smc_version_id smc_version_id_t
 IP version ID definition.
typedef struct _smc_param smc_param_t
 IP parameter definition.
typedef struct
_smc_power_mode_lls_config 
smc_power_mode_lls_config_t
 SMC Low-Leakage Stop power mode configuration.
typedef struct
_smc_power_mode_vlls_config 
smc_power_mode_vlls_config_t
 SMC Very Low-Leakage Stop power mode configuration.

Enumerations

enum  _smc_power_mode_protection {
  kSMC_AllowPowerModeVlls = SMC_PMPROT_AVLLS_MASK, kSMC_AllowPowerModeLls = SMC_PMPROT_ALLS_MASK, kSMC_AllowPowerModeVlp = SMC_PMPROT_AVLP_MASK, kSMC_AllowPowerModeHsrun = SMC_PMPROT_AHSRUN_MASK,
  kSMC_AllowPowerModeAll
}
 

Power Modes Protection.

More...
enum  _smc_power_state {
  kSMC_PowerStateRun = 0x01U << 0U, kSMC_PowerStateStop = 0x01U << 1U, kSMC_PowerStateVlpr = 0x01U << 2U, kSMC_PowerStateVlpw = 0x01U << 3U,
  kSMC_PowerStateVlps = 0x01U << 4U, kSMC_PowerStateLls = 0x01U << 5U, kSMC_PowerStateVlls = 0x01U << 6U, kSMC_PowerStateHsrun
}
 

Power Modes in PMSTAT.

More...
enum  _smc_run_mode { kSMC_RunNormal = 0U, kSMC_RunVlpr = 2U, kSMC_Hsrun }
 

Run mode definition.

More...
enum  _smc_stop_mode { kSMC_StopNormal = 0U, kSMC_StopVlps = 2U, kSMC_StopLls = 3U, kSMC_StopVlls }
 

Stop mode definition.

More...
enum  _smc_stop_submode { kSMC_StopSub0 = 0U, kSMC_StopSub1 = 1U, kSMC_StopSub2 = 2U, kSMC_StopSub3 = 3U }
 

VLLS/LLS stop sub mode definition.

More...
enum  _smc_partial_stop_mode { kSMC_PartialStop = 0U, kSMC_PartialStop1 = 1U, kSMC_PartialStop2 = 2U }
 

Partial STOP option.

More...
enum  _smc_status { kStatus_SMC_StopAbort = MAKE_STATUS(kStatusGroup_POWER, 0) }
 

SMC configuration status.

More...

System mode controller APIs

static void SMC_GetVersionId (SMC_Type *base, smc_version_id_t *versionId)
 Gets the SMC version ID.
void SMC_GetParam (SMC_Type *base, smc_param_t *param)
 Gets the SMC parameter.
static void SMC_SetPowerModeProtection (SMC_Type *base, uint8_t allowedModes)
 Configures all power mode protection settings.
static smc_power_state_t SMC_GetPowerModeState (SMC_Type *base)
 Gets the current power mode status.
void SMC_PreEnterStopModes (void)
 Prepares to enter stop modes.
void SMC_PostExitStopModes (void)
 Recovers after wake up from stop modes.
void SMC_PreEnterWaitModes (void)
 Prepares to enter wait modes.
void SMC_PostExitWaitModes (void)
 Recovers after wake up from stop modes.
status_t SMC_SetPowerModeRun (SMC_Type *base)
 Configures the system to RUN power mode.
status_t SMC_SetPowerModeHsrun (SMC_Type *base)
 Configures the system to HSRUN power mode.
status_t SMC_SetPowerModeWait (SMC_Type *base)
 Configures the system to WAIT power mode.
status_t SMC_SetPowerModeStop (SMC_Type *base, smc_partial_stop_option_t option)
 Configures the system to Stop power mode.
status_t SMC_SetPowerModeVlpr (SMC_Type *base, bool wakeupMode)
 Configures the system to VLPR power mode.
status_t SMC_SetPowerModeVlpr (SMC_Type *base)
 Configures the system to VLPR power mode.
status_t SMC_SetPowerModeVlpw (SMC_Type *base)
 Configures the system to VLPW power mode.
status_t SMC_SetPowerModeVlps (SMC_Type *base)
 Configures the system to VLPS power mode.
status_t SMC_SetPowerModeLls (SMC_Type *base, const smc_power_mode_lls_config_t *config)
 Configures the system to LLS power mode.
status_t SMC_SetPowerModeLls (SMC_Type *base)
 Configures the system to LLS power mode.
status_t SMC_SetPowerModeVlls (SMC_Type *base, const smc_power_mode_vlls_config_t *config)
 Configures the system to VLLS power mode.

Typedef Documentation

typedef struct _smc_param smc_param_t

IP parameter definition.

Partial STOP option.

SMC Low-Leakage Stop power mode configuration.

Power Modes Protection.

SMC Very Low-Leakage Stop power mode configuration.

Power Modes in PMSTAT.

Run mode definition.

Stop mode definition.

VLLS/LLS stop sub mode definition.

IP version ID definition.


Enumeration Type Documentation

Partial STOP option.

Enumerator:
kSMC_PartialStop 

STOP - Normal Stop mode

kSMC_PartialStop1 

Partial Stop with both system and bus clocks disabled

kSMC_PartialStop2 

Partial Stop with system clock disabled and bus clock enabled

Definition at line 126 of file fsl_smc.h.

Power Modes Protection.

Enumerator:
kSMC_AllowPowerModeVlls 

Allow Very-low-leakage Stop Mode.

kSMC_AllowPowerModeLls 

Allow Low-leakage Stop Mode.

kSMC_AllowPowerModeVlp 

Allow Very-Low-power Mode.

kSMC_AllowPowerModeHsrun 

Allow High-speed Run mode.

kSMC_AllowPowerModeAll 

Allow all power mode.

Definition at line 30 of file fsl_smc.h.

Power Modes in PMSTAT.

Enumerator:
kSMC_PowerStateRun 

0000_0001 - Current power mode is RUN

kSMC_PowerStateStop 

0000_0010 - Current power mode is STOP

kSMC_PowerStateVlpr 

0000_0100 - Current power mode is VLPR

kSMC_PowerStateVlpw 

0000_1000 - Current power mode is VLPW

kSMC_PowerStateVlps 

0001_0000 - Current power mode is VLPS

kSMC_PowerStateLls 

0010_0000 - Current power mode is LLS

kSMC_PowerStateVlls 

0100_0000 - Current power mode is VLLS

kSMC_PowerStateHsrun 

1000_0000 - Current power mode is HSRUN

Definition at line 63 of file fsl_smc.h.

Run mode definition.

Enumerator:
kSMC_RunNormal 

Normal RUN mode.

kSMC_RunVlpr 

Very-low-power RUN mode.

kSMC_Hsrun 

High-speed Run mode (HSRUN).

Definition at line 84 of file fsl_smc.h.

SMC configuration status.

Enumerator:
kStatus_SMC_StopAbort 

Entering Stop mode is abort

Definition at line 136 of file fsl_smc.h.

Stop mode definition.

Enumerator:
kSMC_StopNormal 

Normal STOP mode.

kSMC_StopVlps 

Very-low-power STOP mode.

kSMC_StopLls 

Low-leakage Stop mode.

kSMC_StopVlls 

Very-low-leakage Stop mode.

Definition at line 96 of file fsl_smc.h.

VLLS/LLS stop sub mode definition.

Enumerator:
kSMC_StopSub0 

Stop submode 0, for VLLS0/LLS0.

kSMC_StopSub1 

Stop submode 1, for VLLS1/LLS1.

kSMC_StopSub2 

Stop submode 2, for VLLS2/LLS2.

kSMC_StopSub3 

Stop submode 3, for VLLS3/LLS3.

Definition at line 114 of file fsl_smc.h.


Function Documentation

void SMC_GetParam ( SMC_Type base,
smc_param_t param 
)

Gets the SMC parameter.

This function gets the SMC parameter including the enabled power mdoes.

Parameters:
baseSMC peripheral base address.
paramPointer to the SMC param structure.

brief Gets the SMC parameter.

This function gets the SMC parameter including the enabled power mdoes.

param base SMC peripheral base address. param param Pointer to the SMC param structure.

Definition at line 84 of file fsl_smc.c.

static smc_power_state_t SMC_GetPowerModeState ( SMC_Type base ) [static]

Gets the current power mode status.

This function returns the current power mode status. After the application switches the power mode, it should always check the status to check whether it runs into the specified mode or not. The application should check this mode before switching to a different mode. The system requires that only certain modes can switch to other specific modes. See the reference manual for details and the smc_power_state_t for information about the power status.

Parameters:
baseSMC peripheral base address.
Returns:
Current power mode status.

Definition at line 279 of file fsl_smc.h.

static void SMC_GetVersionId ( SMC_Type base,
smc_version_id_t versionId 
) [static]

Gets the SMC version ID.

This function gets the SMC version ID, including major version number, minor version number, and feature specification number.

Parameters:
baseSMC peripheral base address.
versionIdPointer to the version ID structure.

Definition at line 226 of file fsl_smc.h.

void SMC_PostExitStopModes ( void   )

Recovers after wake up from stop modes.

This function should be called after wake up from STOP/VLPS/LLS/VLLS modes. It is used with SMC_PreEnterStopModes.

brief Recovers after wake up from stop modes.

This function should be called after wake up from STOP/VLPS/LLS/VLLS modes. It is used with ref SMC_PreEnterStopModes.

Definition at line 111 of file fsl_smc.c.

void SMC_PostExitWaitModes ( void   )

Recovers after wake up from stop modes.

This function should be called after wake up from WAIT/VLPW modes. It is used with SMC_PreEnterWaitModes.

brief Recovers after wake up from stop modes.

This function should be called after wake up from WAIT/VLPW modes. It is used with ref SMC_PreEnterWaitModes.

Definition at line 134 of file fsl_smc.c.

void SMC_PreEnterStopModes ( void   )

Prepares to enter stop modes.

This function should be called before entering STOP/VLPS/LLS/VLLS modes.

brief Prepares to enter stop modes.

This function should be called before entering STOP/VLPS/LLS/VLLS modes.

Definition at line 99 of file fsl_smc.c.

void SMC_PreEnterWaitModes ( void   )

Prepares to enter wait modes.

This function should be called before entering WAIT/VLPW modes.

brief Prepares to enter wait modes.

This function should be called before entering WAIT/VLPW modes.

Definition at line 122 of file fsl_smc.c.

status_t SMC_SetPowerModeHsrun ( SMC_Type base )

Configures the system to HSRUN power mode.

Parameters:
baseSMC peripheral base address.
Returns:
SMC configuration error code.

brief Configures the system to HSRUN power mode.

param base SMC peripheral base address. return SMC configuration error code.

Definition at line 166 of file fsl_smc.c.

status_t SMC_SetPowerModeLls ( SMC_Type base,
const smc_power_mode_lls_config_t config 
)

Configures the system to LLS power mode.

Parameters:
baseSMC peripheral base address.
configThe LLS power mode configuration structure
Returns:
SMC configuration error code.
status_t SMC_SetPowerModeLls ( SMC_Type base )

Configures the system to LLS power mode.

Parameters:
baseSMC peripheral base address.
Returns:
SMC configuration error code.
static void SMC_SetPowerModeProtection ( SMC_Type base,
uint8_t  allowedModes 
) [static]

Configures all power mode protection settings.

This function configures the power mode protection settings for supported power modes in the specified chip family. The available power modes are defined in the smc_power_mode_protection_t. This should be done at an early system level initialization stage. See the reference manual for details. This register can only write once after the power reset.

The allowed modes are passed as bit map. For example, to allow LLS and VLLS, use SMC_SetPowerModeProtection(kSMC_AllowPowerModeVlls | kSMC_AllowPowerModeVlps). To allow all modes, use SMC_SetPowerModeProtection(kSMC_AllowPowerModeAll).

Parameters:
baseSMC peripheral base address.
allowedModesBitmap of the allowed power modes.

Definition at line 260 of file fsl_smc.h.

status_t SMC_SetPowerModeRun ( SMC_Type base )

Configures the system to RUN power mode.

Parameters:
baseSMC peripheral base address.
Returns:
SMC configuration error code.

brief Configures the system to RUN power mode.

param base SMC peripheral base address. return SMC configuration error code.

Definition at line 146 of file fsl_smc.c.

status_t SMC_SetPowerModeStop ( SMC_Type base,
smc_partial_stop_option_t  option 
)

Configures the system to Stop power mode.

Parameters:
baseSMC peripheral base address.
optionPartial Stop mode option.
Returns:
SMC configuration error code.

brief Configures the system to Stop power mode.

param base SMC peripheral base address. param option Partial Stop mode option. return SMC configuration error code.

Definition at line 204 of file fsl_smc.c.

status_t SMC_SetPowerModeVlls ( SMC_Type base,
const smc_power_mode_vlls_config_t config 
)

Configures the system to VLLS power mode.

Parameters:
baseSMC peripheral base address.
configThe VLLS power mode configuration structure.
Returns:
SMC configuration error code.

brief Configures the system to VLLS power mode.

param base SMC peripheral base address. param config The VLLS power mode configuration structure. return SMC configuration error code.

Definition at line 399 of file fsl_smc.c.

status_t SMC_SetPowerModeVlpr ( SMC_Type base,
bool  wakeupMode 
)

Configures the system to VLPR power mode.

Parameters:
baseSMC peripheral base address.
wakeupModeEnter Normal Run mode if true, else stay in VLPR mode.
Returns:
SMC configuration error code.
status_t SMC_SetPowerModeVlpr ( SMC_Type base )

Configures the system to VLPR power mode.

Parameters:
baseSMC peripheral base address.
Returns:
SMC configuration error code.
status_t SMC_SetPowerModeVlps ( SMC_Type base )

Configures the system to VLPS power mode.

Parameters:
baseSMC peripheral base address.
Returns:
SMC configuration error code.

brief Configures the system to VLPS power mode.

param base SMC peripheral base address. return SMC configuration error code.

Definition at line 302 of file fsl_smc.c.

status_t SMC_SetPowerModeVlpw ( SMC_Type base )

Configures the system to VLPW power mode.

Parameters:
baseSMC peripheral base address.
Returns:
SMC configuration error code.

brief Configures the system to VLPW power mode.

param base SMC peripheral base address. return SMC configuration error code.

Definition at line 284 of file fsl_smc.c.

status_t SMC_SetPowerModeWait ( SMC_Type base )

Configures the system to WAIT power mode.

Parameters:
baseSMC peripheral base address.
Returns:
SMC configuration error code.

brief Configures the system to WAIT power mode.

param base SMC peripheral base address. return SMC configuration error code.

Definition at line 186 of file fsl_smc.c.