66 #define SMC_TIMEOUT 1000U
86 regValue = baseAddr->
VERID;
90 regValue = baseAddr->
VERID;
94 regValue = baseAddr->
VERID;
125 static const uint16_t transitionTable[] =
135 (void) transitionTable;
139 DEV_ASSERT((
size_t)powerModeName < (
sizeof(transitionTable) /
sizeof(transitionTable[0])));
144 switch (powerModeName)
175 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
192 #if FEATURE_SMC_HAS_WAIT_VLPW
193 case POWER_MANAGER_WAIT:
195 case POWER_MANAGER_VLPW:
197 if (powerModeName == POWER_MODE_VLPW)
218 #if FEATURE_SMC_HAS_STOPO
225 #if FEATURE_SMC_HAS_PSTOPO
226 if (powerModeConfig->pStopOption)
228 SMC_HAL_SetPStopOption(baseAddr, powerModeConfig->pStopOptionValue);
277 uint32_t regValue = 0U;
285 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
293 baseAddr->
PMPROT = regValue;
308 uint32_t regValue = (uint32_t)baseAddr->
PMPROT;
319 #if FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE
329 retValue = (regValue == 0UL) ?
false :
true;
348 for (i = 0U; i < timeout; i++)
358 retValue = (i < timeout);
#define SMC_VERID_FEATURE_MASK
#define S32_SCB_SCR_SLEEPDEEP_MASK
#define SMC_PMPROT_AHSRUN(x)
bool SMC_HAL_GetProtectionMode(const SMC_Type *const baseAddr, const power_modes_protect_t protect)
Gets the the current power mode protection setting.
static power_mode_stat_t SMC_HAL_GetPowerModeStatus(const SMC_Type *const baseAddr)
Gets the current power mode stat.
#define SMC_PMPROT_AVLP_SHIFT
Power mode protection configuration Implements smc_power_mode_protection_config_t_Class.
#define SMC_PMPROT_AHSRUN_SHIFT
power_manager_modes_t powerModeName
#define SMC_VERID_FEATURE_SHIFT
SMC module version number Implements smc_version_info_t_Class.
void SMC_HAL_SetProtectionMode(SMC_Type *const baseAddr, const smc_power_mode_protection_config_t *const protectConfig)
Configures all power mode protection settings.
static void SMC_HAL_SetStopModeControl(SMC_Type *const baseAddr, const smc_stop_mode_t stopMode)
Configures the STOP mode control setting.
#define STANDBY()
Enter low-power standby state WFI (Wait For Interrupt) makes the processor suspend execution (Clock i...
#define SMC_PMPROT_AVLP_MASK
status_t
Status return codes. Common error codes will be a unified enumeration (C enum) that will contain all ...
#define SMC_PMPROT_AVLP(x)
static bool SMC_HAL_WaitForStatChange(const SMC_Type *const baseAddr, const power_mode_stat_t mode, const uint32_t timeout)
power_manager_modes_t
Power modes enumeration.
static void SMC_HAL_SetRunModeControl(SMC_Type *const baseAddr, const smc_run_mode_t runMode)
Configures the the RUN mode control setting.
status_t SMC_HAL_SetPowerMode(SMC_Type *const baseAddr, const smc_power_mode_config_t *const powerModeConfig)
Configures the power mode.
void SMC_HAL_GetVersion(const SMC_Type *const baseAddr, smc_version_info_t *const versionInfo)
Get the version of the SMC module.
#define SMC_VERID_MAJOR_MASK
Power mode control configuration used for calling the SMC_SYS_SetPowerMode API Implements smc_power_m...
static void SMC_HAL_SetStopOption(SMC_Type *const baseAddr, const smc_stop_option_t option)
Configures the STOPO (Stop Option).
power_modes_protect_t
Power Modes Protection Implements power_modes_protect_t_Class.
#define SMC_VERID_MAJOR_SHIFT
power_mode_stat_t
Power Modes in PMSTAT Implements power_mode_stat_t_Class.
#define SMC_VERID_MINOR_MASK
smc_stop_mode_t
Stop mode definition Implements smc_stop_mode_t_Class.
smc_stop_option_t stopOptionValue
#define SMC_PMPROT_AHSRUN_MASK
#define SMC_VERID_MINOR_SHIFT