51 #include "power_smc_hw_access.h"
54 #define POWER_SET_MODE_TIMEOUT 1000U
150 SMC_SetProtectionMode(
SMC, &powerModeProtConfig);
206 switch (SMC_GetPowerModeStatus(
SMC))
208 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
211 retVal = POWER_MANAGER_HSRUN;
254 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
271 if (SMC_GetPowerModeStatus(
SMC) == modeStat)
301 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
303 case POWER_MANAGER_HSRUN:
403 #if FEATURE_SMC_HAS_WAIT_VLPW
405 case POWER_MANAGER_WAIT:
420 case POWER_MANAGER_VLPW:
435 #if FEATURE_SMC_HAS_PSTOPO
437 case POWER_MANAGER_PSTOP1:
439 case POWER_MANAGER_PSTOP2:
442 #if FEATURE_SMC_HAS_STOPO
444 case POWER_MANAGER_STOP1:
446 case POWER_MANAGER_STOP2:
463 #if FEATURE_SMC_HAS_PSTOPO
464 halModeConfig.pstopOption =
true;
466 if (POWER_MANAGER_PSTOP1 == configPtr->
powerMode)
468 halModeConfig.pstopOptionValue = SMC_PSTOP_STOP1;
470 else if (POWER_MANAGER_PSTOP2 == configPtr->
powerMode)
472 halModeConfig.pstopOptionValue = SMC_PSTOP_STOP2;
476 halModeConfig.pstopOptionValue = SMC_PSTOP_STOP;
480 #if FEATURE_SMC_HAS_STOPO
482 if (POWER_MANAGER_STOP1 == configPtr->
powerMode)
484 halModeConfig.stopOption =
true;
485 halModeConfig.stopOptionValue =
SMC_STOP1;
487 else if (POWER_MANAGER_STOP2 == configPtr->
powerMode)
489 halModeConfig.stopOption =
true;
490 halModeConfig.stopOptionValue =
SMC_STOP2;
494 halModeConfig.stopOption =
false;
501 pwrModeStat = SMC_GetPowerModeStatus(
SMC);
static status_t POWER_SYS_SwitchToRunningPowerMode(const power_manager_user_config_t *const configPtr)
power_manager_state_t gPowerManagerState
Power manager internal structure.
power_mode_stat_t
Power Modes in PMSTAT Implements power_mode_stat_t_Class.
Power mode protection configuration Implements smc_power_mode_protection_config_t_Class.
power_manager_modes_t powerModeName
status_t POWER_SYS_DoDeinit(void)
This function implementation-specific de-initialization of power manager.
status_t POWER_SYS_DoInit(void)
This function implementation-specific configuration of power modes.
smc_run_mode_t
Run mode definition Implements smc_run_mode_t_Class.
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
#define S32_SCB_SCR_SLEEPONEXIT_MASK
power_manager_modes_t POWER_SYS_GetCurrentMode(void)
This function returns currently running power mode.
Power mode control configuration used for calling the SMC_SYS_SetPowerMode API Implements smc_power_m...
Power mode user configuration structure.
static status_t POWER_SYS_WaitForModeStatus(smc_run_mode_t mode)
static status_t POWER_SYS_SwitchToSleepingPowerMode(const power_manager_user_config_t *const configPtr)
Power manager internal state structure.
power_manager_modes_t powerMode
#define POWER_SET_MODE_TIMEOUT
power_manager_modes_t
Power modes enumeration.
status_t POWER_SYS_DoSetMode(const power_manager_user_config_t *const configPtr)
This function configures the power mode.