Low power mode configuration

Functions

__STATIC_INLINE void ll_pwr_set_wakeup_condition (uint32_t condition)
 Set the DeepSleep WakeUp Condition. More...
 
__STATIC_INLINE void ll_pwr_clear_wakeup_condition (uint32_t condition)
 Clear the DeepSleep WakeUp Condition. More...
 
__STATIC_INLINE uint32_t ll_pwr_get_wakeup_condition (void)
 Get the Selected DeepSleep WakeUp Condition. More...
 
__STATIC_INLINE uint32_t ll_pwr_get_wakeup_event (void)
 Get the Event that triggered the DeepSleep WakeUp. More...
 
__STATIC_INLINE void ll_pwr_set_sleep_timer_value (uint32_t value)
 Set the 32 bits AON Sleep Timer Value to WakeUp the MCU from DeepSleep Mode. More...
 
__STATIC_INLINE uint32_t ll_pwr_get_sleep_timer_read_value (void)
 Read the AON Sleep Timer counter current value. More...
 
__STATIC_INLINE void ll_pwr_enable_smc_wakeup_req (void)
 Enable the SMC WakeUp Request. More...
 
__STATIC_INLINE void ll_pwr_disable_smc_wakeup_req (void)
 Disable the SMC WakeUp Request. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_smc_wakeup_req (void)
 Check if the SMC WakeUp Request was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_set_dpad_le_value (uint32_t sleep, uint32_t wakeup)
 Set the DPAD LE value during sleep and after wake up. More...
 

Detailed Description

Function Documentation

◆ ll_pwr_clear_wakeup_condition()

__STATIC_INLINE void ll_pwr_clear_wakeup_condition ( uint32_t  condition)

Clear the DeepSleep WakeUp Condition.

Register|BitsName --------|-------- MCU_WAKEUP_CTRL | MCU_WAKEUP_CTRL

Parameters
conditionThis parameter can be one of the following values:
Return values
None

Definition at line 194 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_disable_smc_wakeup_req()

__STATIC_INLINE void ll_pwr_disable_smc_wakeup_req ( void  )

Disable the SMC WakeUp Request.

Note
This function is used to clear SMC WakeUp Request.

Register|BitsName --------|-------- BLE_MISC | SMC_WAKEUP_REQ

Return values
None

Definition at line 300 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_enable_smc_wakeup_req()

__STATIC_INLINE void ll_pwr_enable_smc_wakeup_req ( void  )

Enable the SMC WakeUp Request.

Note
Once this is set up, MCU will wake up SMC, and this bit need to be cleared by MCU.

Register|BitsName --------|-------- BLE_MISC | SMC_WAKEUP_REQ

Return values
None

Definition at line 285 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_get_sleep_timer_read_value()

__STATIC_INLINE uint32_t ll_pwr_get_sleep_timer_read_value ( void  )

Read the AON Sleep Timer counter current value.

Register|BitsName --------|-------- SLEEP_TIMER_R | PWR_CTL_TIMER_32B

Return values
32bit AON Timer Count Value

Definition at line 269 of file ll_pwr.h.

References SLP_TIMER0.

◆ ll_pwr_get_wakeup_condition()

__STATIC_INLINE uint32_t ll_pwr_get_wakeup_condition ( void  )

Get the Selected DeepSleep WakeUp Condition.

Register|BitsName --------|-------- MCU_WAKEUP_CTRL | MCU_WAKEUP_CTRL

Return values
Returnedvalue can be one of the following values:

Definition at line 216 of file ll_pwr.h.

References AON_CTL, and LL_PWR_WKUP_COND_ALL.

◆ ll_pwr_get_wakeup_event()

__STATIC_INLINE uint32_t ll_pwr_get_wakeup_event ( void  )

Get the Event that triggered the DeepSleep WakeUp.

Note
Only available on GR551xx_B2 and later version

Register|BitsName --------|-------- AON_SLP_EVENT | AON_SLP_EVENT

Return values
Returnedvalue can be combination of the following values:

Definition at line 238 of file ll_pwr.h.

References AON_CTL, and LL_PWR_WKUP_EVENT_ALL.

◆ ll_pwr_is_enabled_smc_wakeup_req()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_smc_wakeup_req ( void  )

Check if the SMC WakeUp Request was enabled or disabled.

Register|BitsName --------|-------- BLE_MISC | SMC_WAKEUP_REQ

Return values
Stateof bit (1 or 0).

Definition at line 314 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_set_dpad_le_value()

__STATIC_INLINE void ll_pwr_set_dpad_le_value ( uint32_t  sleep,
uint32_t  wakeup 
)

Set the DPAD LE value during sleep and after wake up.

Register|BitsName --------|-------- DPAD_LE_CTRL | DPAD_LE_SLP_VAL DPAD_LE_CTRL | DPAD_LE_WKUP_VAL

Parameters
sleepThis parameter can be one of the following values:
wakeupThis parameter can be one of the following values:
Return values
None

Definition at line 335 of file ll_pwr.h.

◆ ll_pwr_set_sleep_timer_value()

__STATIC_INLINE void ll_pwr_set_sleep_timer_value ( uint32_t  value)

Set the 32 bits AON Sleep Timer Value to WakeUp the MCU from DeepSleep Mode.

Note
After the value was set, use LL_PWR_CMD_32_TIMER_LD command to load the configuration into Power State Controller.

Register|BitsName --------|-------- SLEEP_TIMER_W | SLEEP_TIMER_W

Parameters
value32 bits count value loaded into the t32bit_timer
Return values
None

Definition at line 255 of file ll_pwr.h.

References SLP_TIMER0.

◆ ll_pwr_set_wakeup_condition()

__STATIC_INLINE void ll_pwr_set_wakeup_condition ( uint32_t  condition)

Set the DeepSleep WakeUp Condition.

Register|BitsName --------|-------- MCU_WAKEUP_CTRL | MCU_WAKEUP_CTRL

Parameters
conditionThis parameter can be one of the following values:
Return values
None

Definition at line 171 of file ll_pwr.h.

References AON_CTL.