Low Power mode configuration functions

Functions

void hal_pwr_set_wakeup_condition (uint32_t condition)
 Set the DeepSleep WakeUp Condition. More...
 
void hal_pwr_config_timer_wakeup (uint8_t timer_mode, uint32_t load_count)
 Configure the AON Sleep Timer mode and count used to wakeup MCU. More...
 
void hal_pwr_config_ext_wakeup (uint32_t ext_wakeup_pinx, uint32_t ext_wakeup_type)
 Configure the External AON GPIO pins and pin trigger type that is used to wakeup MCU. More...
 
void hal_pwr_disable_ext_wakeup (uint32_t disable_wakeup_pinx)
 Disable the interrupt wake-up function of the specified AON GPIO pin. More...
 
void hal_pwr_enter_chip_deepsleep (void)
 Enters DeepSleep mode. More...
 

Detailed Description

Function Documentation

◆ hal_pwr_config_ext_wakeup()

void hal_pwr_config_ext_wakeup ( uint32_t  ext_wakeup_pinx,
uint32_t  ext_wakeup_type 
)

Configure the External AON GPIO pins and pin trigger type that is used to wakeup MCU.

Parameters
[in]ext_wakeup_pinxThis parameter can be a combination of the following values:
[in]ext_wakeup_typeThis parameter can be a combination of the following values:
Note
When the level of any selected GPIO pin changes in accordance with the set trigger type, MCU will be waked up from DeepSleep mode.

◆ hal_pwr_config_timer_wakeup()

void hal_pwr_config_timer_wakeup ( uint8_t  timer_mode,
uint32_t  load_count 
)

Configure the AON Sleep Timer mode and count used to wakeup MCU.

Parameters
[in]timer_modeSpecifies the sleep timer mode. This parameter can be a combination of the following values:
[in]load_countCount value of the AON Sleep Timer.
Note
The sleep clock of AON Timer is 32 KHz.

◆ hal_pwr_disable_ext_wakeup()

void hal_pwr_disable_ext_wakeup ( uint32_t  disable_wakeup_pinx)

Disable the interrupt wake-up function of the specified AON GPIO pin.

Parameters
[in]disable_wakeup_pinxThis parameter can be a combination of the following values:

◆ hal_pwr_enter_chip_deepsleep()

void hal_pwr_enter_chip_deepsleep ( void  )

Enters DeepSleep mode.

Note
In DeepSleep mode, all I/O pins keep the same state as in Run mode.

◆ hal_pwr_set_wakeup_condition()

void hal_pwr_set_wakeup_condition ( uint32_t  condition)

Set the DeepSleep WakeUp Condition.

Parameters
[in]conditionThis parameter can be a combination of the following values:
Note
When PWR_WKUP_COND_EXT is set, use hal_pwr_config_ext_wakeup() to configure wakeup pins and pin trigger type. When PWR_WKUP_COND_TIMER is set, use hal_pwr_config_timer_wakeup() to configure the time count to wakeup. When PWR_WKUP_COND_ALL is set, use hal_pwr_config_ext_wakeup() and hal_pwr_config_timer_wakeup() to configure AON timer and External AON GPIO.