HAL Power Modes Function Documentation
Sys_PowerModes_Sleep_Init
void Sys_PowerModes_Sleep_Init(sleep_mode_cfg * p_sleep_mode_cfg)
Location: power_modes.h:264
NOTE: This function will modify ACS->WAKEUP_CFG and ACS->BOOT_CFG
| Example Code for Sys_PowerModes_Sleep_Init |
// Initialize sleep before entering sleep Sys_PowerModes_Sleep_Init(&app_sleep_mode_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
p_sleep_mode_cfg |
pointer to the sleep_mode_cfg instance |
Sys_PowerModes_Sleep_Enter
void Sys_PowerModes_Sleep_Enter(sleep_mode_cfg * p_sleep_mode_cfg, Sleep_Retention_t retention_type)
Location: power_modes.h:278
NOTE: This function will enter sleep mode if there are no wakeup events or NVIC interrupts pending, otherwise it will continue to RUN mode and service pending events and interrupts
| Example Code for Sys_PowerModes_Sleep_Enter |
// Power Mode enter sleep with core retention Sys_PowerModes_Sleep_Enter(&app_sleep_mode_cfg, SLEEP_CORE_RETENTION); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
p_sleep_mode_cfg |
pointer to the sleep_mode_cfg instance |
|
in |
retention_type |
retention type for sleep mode; use SLEEP_NO_RETENTION, SLEEP_MEM_RETENTION, SLEEP_CORE_RETENTION |
Sys_PowerModes_Standby_Init
void Sys_PowerModes_Standby_Init(standby_mode_cfg * p_standby_mode_cfg)
Location: power_modes.h:287
NOTE: This function will modify ACS->WAKEUP_CFG and ACS->BOOT_CFG
| Example Code for Sys_PowerModes_Standby_Init |
// Initialize standby mode Sys_PowerModes_Standby_Init(&app_standby_mode_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
p_standby_mode_cfg |
pointer to the standby_mode_cfg instance |
Sys_PowerModes_Standby_Enter
void Sys_PowerModes_Standby_Enter(standby_mode_cfg * p_standby_mode_cfg)
Location: power_modes.h:298
NOTE: This function will enter standby mode if there are no wakeup events or NVIC interrupts pending, otherwise it will continue to RUN mode and service pending events and interrupts
| Example Code for Sys_PowerModes_Standby_Enter |
// Power Mode enter standby mode Sys_PowerModes_Standby_Enter(&app_standby_mode_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
p_standby_mode_cfg |
pointer to the sleep_mode_cfg instance |
Sys_PowerModes_DeepSleep_Init
void Sys_PowerModes_DeepSleep_Init(deepsleep_mode_cfg * p_deepsleep_mode_cfg)
Location: power_modes.h:307
NOTE: This function will modify ACS->WAKEUP_CFG and ACS->BOOT_CFG
| Example Code for Sys_PowerModes_DeepSleep_Init |
// Initialize deepsleep Sys_PowerModes_DeepSleep_Init(&app_deepsleep_mode_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
p_deepsleep_mode_cfg |
pointer to the deepsleep_mode_cfg instance |
Sys_PowerModes_DeepSleep_Enter
void Sys_PowerModes_DeepSleep_Enter(deepsleep_mode_cfg * p_deepsleep_mode_cfg)
Location: power_modes.h:318
NOTE: This function will enter standby mode if there are no wakeup events or NVIC interrupts pending, otherwise it will continue to RUN mode and service pending events and interrupts
| Example Code for Sys_PowerModes_DeepSleep_Enter |
// Power Mode enter deepsleep Sys_PowerModes_DeepSleep_Enter(&app_deepsleep_mode_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
p_deepsleep_mode_cfg |
pointer to the deepsleep_mode_cfg instance |
Sys_PowerModes_Wakeup_WithReset
void Sys_PowerModes_Wakeup_WithReset(sleep_mode_cfg * p_sleep_mode_cfg)
Location: power_modes.h:328
NOTE: This function initialize the system after wakeup with reset
| Example Code for Sys_PowerModes_Wakeup_WithReset |
// Initialize the system after a wakeup where the system was reset (no retention). // Use the deep sleep configuration Sys_PowerModes_Wakeup_WithReset((sleep_mode_cfg*)p_deepsleep_mode_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
p_sleep_mode_cfg |
pointer to the sleep_mode_cfg instance |
Sys_PowerModes_Wakeup_ConfigEnable
void Sys_PowerModes_Wakeup_ConfigEnable(uint32_t acs_wakeup_cfg, uint32_t * p_wakeup_cfg)
Location: power_modes.h:345
NOTE: This function will modify the corresponding enables bits only
| Example Code for Sys_PowerModes_Wakeup_ConfigEnable |
// Power Mode wakeup configuration enable Sys_PowerModes_Wakeup_ConfigEnable((WAKEUP_FIFO_ENABLE | WAKEUP_GPIO1_ENABLE)&app_sleep_mode_cfg->wakeup_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
acs_wakeup_cfg |
Wakeup Config configuration; use WAKEUP_DCDC_OVERLOAD_ENABLE, WAKEUP_GPIO*_FALLING, WAKEUP_GPIO*_ENABLE, WAKEUP_RTC_OVERFLOW_ENABLE, WAKEUP_FIFO_ENABLE, |
|
in |
p_wakeup_cfg |
pointer to the structure member instance of sleep_mode_cfg, or deepsleep_mode_cfg, or standby_mode_cfg |
Sys_PowerModes_Wakeup_ConfigDisable
void Sys_PowerModes_Wakeup_ConfigDisable(uint32_t acs_wakeup_cfg, uint32_t * p_wakeup_cfg)
Location: power_modes.h:362
NOTE: This function will modify the corresponding enables bits only
| Example Code for Sys_PowerModes_Wakeup_ConfigDisable |
// Power Mode wakeup configuration disable Sys_PowerModes_Wakeup_ConfigDisable(WAKEUP_FIFO_ENABLE | WAKEUP_GPIO1_ENABLE)&app_sleep_mode_cfg->wakeup_cfg); |
Parameters
| Direction | Name | Description |
|---|---|---|
|
in |
acs_wakeup_cfg |
Wakeup Config configuration; use WAKEUP_DCDC_OVERLOAD_ENABLE, WAKEUP_GPIO*_FALLING, WAKEUP_GPIO*_ENABLE, WAKEUP_RTC_OVERFLOW_ENABLE, WAKEUP_FIFO_ENABLE, |
|
in |
p_wakeup_cfg |
pointer to the structure member instance of sleep_mode_cfg, or deepsleep_mode_cfg, or standby_mode_cfg |