rusEFI
The most advanced open source ECU
|
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... | |
Driver version | |
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... | |
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. | |
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 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.
Power Modes Protection.
Definition at line 30 of file fsl_smc.h.
enum _smc_power_state |
Power Modes in PMSTAT.
Definition at line 63 of file fsl_smc.h.
enum _smc_run_mode |
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.
enum _smc_status |
enum _smc_stop_mode |
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.
enum _smc_stop_submode |
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.
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.
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.
Definition at line 85 of file fsl_smc.c.
|
inlinestatic |
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.
base | SMC peripheral base address. |
Definition at line 279 of file fsl_smc.h.
Referenced by ke1xf_clock_init().
|
inlinestatic |
Gets the SMC version ID.
This function gets the SMC version ID, including major version number, minor version number, and feature specification number.
base | SMC peripheral base address. |
versionId | Pointer 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.
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 | ) |
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.
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.
status_t SMC_SetPowerModeHsrun | ( | SMC_Type * | base | ) |
Configures the system to HSRUN power mode.
base | SMC peripheral base address. |
brief Configures the system to HSRUN power mode.
param base SMC peripheral base address. return SMC configuration error code.
Definition at line 167 of file fsl_smc.c.
Referenced by ke1xf_clock_init().
status_t SMC_SetPowerModeLls | ( | SMC_Type * | base | ) |
Configures the system to LLS power mode.
base | SMC peripheral base address. |
status_t SMC_SetPowerModeLls | ( | SMC_Type * | base, |
const smc_power_mode_lls_config_t * | config | ||
) |
Configures the system to LLS power mode.
base | SMC peripheral base address. |
config | The LLS power mode configuration structure |
|
inlinestatic |
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).
base | SMC peripheral base address. |
allowedModes | Bitmap of the allowed power modes. |
Definition at line 260 of file fsl_smc.h.
Referenced by ke1xf_clock_init().
status_t SMC_SetPowerModeRun | ( | SMC_Type * | base | ) |
Configures the system to RUN power mode.
base | SMC peripheral base address. |
brief Configures the system to RUN power mode.
param base SMC peripheral base address. return SMC configuration error code.
Definition at line 147 of file fsl_smc.c.
Referenced by ke1xf_clock_init().
status_t SMC_SetPowerModeStop | ( | SMC_Type * | base, |
smc_partial_stop_option_t | option | ||
) |
Configures the system to Stop power mode.
base | SMC peripheral base address. |
option | Partial Stop mode option. |
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 205 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.
base | SMC peripheral base address. |
config | The VLLS power mode configuration structure. |
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 400 of file fsl_smc.c.
status_t SMC_SetPowerModeVlpr | ( | SMC_Type * | base | ) |
Configures the system to VLPR power mode.
base | SMC peripheral base address. |
Configures the system to VLPR power mode.
base | SMC peripheral base address. |
wakeupMode | Enter Normal Run mode if true, else stay in VLPR mode. |
status_t SMC_SetPowerModeVlps | ( | SMC_Type * | base | ) |
Configures the system to VLPS power mode.
base | SMC peripheral base address. |
brief Configures the system to VLPS power mode.
param base SMC peripheral base address. return SMC configuration error code.
Definition at line 303 of file fsl_smc.c.
status_t SMC_SetPowerModeVlpw | ( | SMC_Type * | base | ) |
Configures the system to VLPW power mode.
base | SMC peripheral base address. |
brief Configures the system to VLPW power mode.
param base SMC peripheral base address. return SMC configuration error code.
Definition at line 285 of file fsl_smc.c.
status_t SMC_SetPowerModeWait | ( | SMC_Type * | base | ) |
Configures the system to WAIT power mode.
base | SMC peripheral base address. |
brief Configures the system to WAIT power mode.
param base SMC peripheral base address. return SMC configuration error code.
Definition at line 187 of file fsl_smc.c.
bool _smc_power_mode_lls_config::enableLpoClock |
bool _smc_power_mode_vlls_config::enableLpoClock |
bool _smc_power_mode_vlls_config::enablePorDetectInVlls0 |
bool _smc_power_mode_vlls_config::enableRam2InVlls2 |
uint16_t _smc_version_id::feature |
smc_stop_submode_t _smc_power_mode_lls_config::subMode |
smc_stop_submode_t _smc_power_mode_vlls_config::subMode |