Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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.
| typedef enum _smc_partial_stop_mode smc_partial_stop_option_t |
Partial STOP option.
| typedef struct _smc_power_mode_lls_config smc_power_mode_lls_config_t |
SMC Low-Leakage Stop power mode configuration.
| typedef enum _smc_power_mode_protection smc_power_mode_protection_t |
Power Modes Protection.
| typedef struct _smc_power_mode_vlls_config smc_power_mode_vlls_config_t |
SMC Very Low-Leakage Stop power mode configuration.
| 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 struct _smc_version_id smc_version_id_t |
IP version ID definition.
Enumeration Type Documentation
| enum _smc_power_state |
Power Modes in PMSTAT.
- Enumerator:
| enum _smc_run_mode |
| enum _smc_status |
| enum _smc_stop_mode |
| enum _smc_stop_submode |
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:
-
base SMC peripheral base address. param Pointer 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.
| 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:
-
base SMC peripheral base address.
- Returns:
- Current power mode status.
| static void SMC_GetVersionId | ( | SMC_Type * | base, |
| smc_version_id_t * | versionId | ||
| ) | [static] |
| 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.
| 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.
| void SMC_PreEnterStopModes | ( | void | ) |
| void SMC_PreEnterWaitModes | ( | void | ) |
| status_t SMC_SetPowerModeLls | ( | SMC_Type * | base, |
| const smc_power_mode_lls_config_t * | config | ||
| ) |
Configures the system to LLS power mode.
- Parameters:
-
base SMC peripheral base address. config The LLS power mode configuration structure
- Returns:
- SMC configuration error code.
Configures the system to LLS power mode.
- Parameters:
-
base SMC 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:
-
base SMC peripheral base address. allowedModes Bitmap of the allowed power modes.
| status_t SMC_SetPowerModeStop | ( | SMC_Type * | base, |
| smc_partial_stop_option_t | option | ||
| ) |
Configures the system to Stop power mode.
- Parameters:
-
base SMC peripheral base address. option Partial 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.
| status_t SMC_SetPowerModeVlls | ( | SMC_Type * | base, |
| const smc_power_mode_vlls_config_t * | config | ||
| ) |
Configures the system to VLLS power mode.
- Parameters:
-
base SMC peripheral base address. config The 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.
Configures the system to VLPR power mode.
- Parameters:
-
base SMC peripheral base address. wakeupMode Enter Normal Run mode if true, else stay in VLPR mode.
- Returns:
- SMC configuration error code.
Configures the system to VLPR power mode.
- Parameters:
-
base SMC peripheral base address.
- Returns:
- SMC configuration error code.
Generated on Tue Jul 12 2022 15:37:34 by
1.7.2