Low power mode configuration

Functions

SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_set_wakeup_condition (uint32_t condition)
 Set the DeepSleep WakeUp Condition. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_wakeup_condition (void)
 Get the Selected DeepSleep WakeUp Condition. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_wakeup_event (void)
 Get the Event that triggered the DeepSleep WakeUp. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_ext_wakeup_pin (uint32_t wakeup_pin)
 Enable the External WakeUp PINx functionality. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_ext_wakeup_pin (uint32_t wakeup_pin)
 Disable the External WakeUp PINx functionality. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_ext_wakeup_pin (uint32_t wakeup_pin)
 Check if the External WakeUp PINx functionality is enabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_set_ext_wakeup_type (uint32_t wakeup_pin, uint32_t wakeup_type)
 Set the WakeUp Type of External WakeUp PINx. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_ext_wakeup_type (uint32_t wakeup_pin)
 Get the WakeUp Type of External WakeUp PINx. More...
 
SECTION_RAM_CODE __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...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_sleep_timer_value (void)
 Get the 32 bit AON Sleep Timer Value to WakeUp the MCU from DeepSleep Mode. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_smc_wakeup_req (void)
 Enable the SMC WakeUp Request. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_smc_wakeup_req (void)
 Disable the SMC WakeUp Request. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_smc_wakeup_req (void)
 Check if the SMC WakeUp Request was enabled or disabled. More...
 
SECTION_RAM_CODE __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...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_req_excute_psc_command (uint32_t command)
 Request to excute the Power State Controller Command. More...
 

Detailed Description

Function Documentation

◆ ll_pwr_disable_ext_wakeup_pin()

SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_ext_wakeup_pin ( uint32_t  wakeup_pin)

Disable the External WakeUp PINx functionality.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | EXT_WKUP_CTL | MASK | +———————-+———————————–+ \endrst

Parameters
wakeup_pinThis parameter can be a combination of the following values:
Return values
None

Definition at line 375 of file gr55xx_ll_pwr.h.

◆ ll_pwr_disable_smc_wakeup_req()

SECTION_RAM_CODE __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.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | PWR_RET01 | SMC_WAKEUP_REQ | +———————-+———————————–+ \endrst

Return values
None

Definition at line 548 of file gr55xx_ll_pwr.h.

◆ ll_pwr_enable_ext_wakeup_pin()

SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_ext_wakeup_pin ( uint32_t  wakeup_pin)

Enable the External WakeUp PINx functionality.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | EXT_WKUP_CTL | MASK | +———————-+———————————–+ \endrst

Parameters
wakeup_pinThis parameter can be a combination of the following values:
Return values
None

Definition at line 347 of file gr55xx_ll_pwr.h.

◆ ll_pwr_enable_smc_wakeup_req()

SECTION_RAM_CODE __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.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | PWR_RET01 | SMC_WAKEUP_REQ | +———————-+———————————–+ \endrst

Return values
None

Definition at line 529 of file gr55xx_ll_pwr.h.

◆ ll_pwr_get_ext_wakeup_type()

SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_ext_wakeup_type ( uint32_t  wakeup_pin)

Get the WakeUp Type of External WakeUp PINx.

Note
Warning: only one pin can be passed as parameter.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | EXT_WKUP_CTL | INVERT | +———————-+———————————–+ \endrst EXT_WKUP_CTL | TYPE

Parameters
wakeup_pinThis parameter can be one of the following values:
Return values
Returnedvalue can be one of the following values:

Definition at line 471 of file gr55xx_ll_pwr.h.

◆ ll_pwr_get_sleep_timer_value()

SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_sleep_timer_value ( void  )

Get the 32 bit AON Sleep Timer Value to WakeUp the MCU from DeepSleep Mode.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | TIMER_VALUE | PWR_CTL_TIMER_32B | +———————-+———————————–+ \endrst

Return values
32bit AON Timer Count Value

Definition at line 510 of file gr55xx_ll_pwr.h.

◆ ll_pwr_get_wakeup_condition()

SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_wakeup_condition ( void  )

Get the Selected DeepSleep WakeUp Condition.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | EXT_WKUP_CTL | WAKE_UP_SEL | +———————-+———————————–+ \endrst

Return values
Returnedvalue can be one of the following values:

Definition at line 292 of file gr55xx_ll_pwr.h.

◆ ll_pwr_get_wakeup_event()

SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_wakeup_event ( void  )

Get the Event that triggered the DeepSleep WakeUp.

Note
Only available on GR5515_C and later version

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | SLP_EVENT | SMCOSCEN_EVENT | +———————-+———————————–+ \endrst SLP_EVENT | TIMER_EVENT SLP_EVENT | EXT_WKUP_EVENT SLP_EVENT | WATCHDOG_EVENT

Return values
Returnedvalue can be combination of the following values:

Definition at line 321 of file gr55xx_ll_pwr.h.

References LL_PWR_WKUP_EVENT_ALL.

◆ ll_pwr_is_enabled_ext_wakeup_pin()

SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_ext_wakeup_pin ( uint32_t  wakeup_pin)

Check if the External WakeUp PINx functionality is enabled.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | EXT_WKUP_CTL | MASK | +———————-+———————————–+ \endrst

Parameters
wakeup_pinThis parameter can be a combination of the following values:
Return values
Stateof bit (1 or 0).

Definition at line 403 of file gr55xx_ll_pwr.h.

◆ ll_pwr_is_enabled_smc_wakeup_req()

SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_smc_wakeup_req ( void  )

Check if the SMC WakeUp Request was enabled or disabled.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | PWR_RET01 | SMC_WAKEUP_REQ | +———————-+———————————–+ \endrst

Return values
Stateof bit (1 or 0).

Definition at line 566 of file gr55xx_ll_pwr.h.

◆ ll_pwr_req_excute_psc_command()

SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_req_excute_psc_command ( uint32_t  command)

Request to excute the Power State Controller Command.

Note
The PSC command can only be excuted when Power State Controller is not in busy state. Use ll_pwr_is_active_flag_psc_cmd_busy() to check the busy status, and make sure the last command has been finished.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | PSC_CMD_OPC | OPCODE | +———————-+———————————–+ | PSC_CMD | MCU_PWR_REQ | +———————-+———————————–+ \endrst

Parameters
commandThis parameter can be one of the following values: (*) Not available in A0 and B0
Return values
None

Definition at line 638 of file gr55xx_ll_pwr.h.

◆ ll_pwr_set_dpad_le_value()

SECTION_RAM_CODE __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.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | MEM_N_SLP_CTL | DPAD_LE_SLP_VAL | +———————-+———————————–+ | MEM_N_SLP_CTL | DPAD_LE_WKUP_VAL | +———————-+———————————–+ \endrst

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 593 of file gr55xx_ll_pwr.h.

◆ ll_pwr_set_ext_wakeup_type()

SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_set_ext_wakeup_type ( uint32_t  wakeup_pin,
uint32_t  wakeup_type 
)

Set the WakeUp Type of External WakeUp PINx.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | EXT_WKUP_CTL | INVERT | +———————-+———————————–+ \endrst EXT_WKUP_CTL | TYPE

Parameters
wakeup_pinThis parameter can be a combination of the following values:
wakeup_typeThis parameter can be one of the following values:
Return values
None

Definition at line 435 of file gr55xx_ll_pwr.h.

References LL_PWR_EXTWKUP_INVERT_LSB, and LL_PWR_EXTWKUP_TYPE_LSB.

◆ ll_pwr_set_sleep_timer_value()

SECTION_RAM_CODE __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 \rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | TIMER_VALUE | PWR_CTL_TIMER_32B | +———————-+———————————–+ \endrst
Parameters
value32 bits count value loaded into the t32bit_timer
Return values
None

Definition at line 492 of file gr55xx_ll_pwr.h.

◆ ll_pwr_set_wakeup_condition()

SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_set_wakeup_condition ( uint32_t  condition)

Set the DeepSleep WakeUp Condition.

\rst +———————-+———————————–+ | Register | BitsName | +======================+===================================+ | EXT_WKUP_CTL | WAKE_UP_SEL | +———————-+———————————–+ \endrst

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

Definition at line 267 of file gr55xx_ll_pwr.h.