BLE Communication timer and core configuration function

Functions

__STATIC_INLINE void ll_pwr_enable_comm_timer_reset (void)
 Enable the Communication Timer Reset. More...
 
__STATIC_INLINE void ll_pwr_disable_comm_timer_reset (void)
 Disable the Communication Timer Reset, and set Communication Timer to running state. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_timer_reset (void)
 Check if the Communication Timer Reset was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_comm_core_reset (void)
 Enable the Communication Core Reset. More...
 
__STATIC_INLINE void ll_pwr_disable_comm_core_reset (void)
 Disable the Communication Core Reset, and set Communication Core to running state. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_reset (void)
 Check if the Communication Core Reset was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_comm_timer_power (void)
 Enable the Communication Timer Power, the Communication Timer will be Powered Up. More...
 
__STATIC_INLINE void ll_pwr_disable_comm_timer_power (void)
 Disable the Communication Timer Power, the Communication Timer will be Powered Down. More...
 
__STATIC_FORCEINLINE uint32_t ll_pwr_is_enabled_comm_timer_power (void)
 Check if the Communication Timer Power was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_comm_core_power (void)
 Enable the Communication Core Power, the Communication Core will be Powered Up. More...
 
__STATIC_INLINE void ll_pwr_disable_comm_core_power (void)
 Disable the Communication Core Power, the Communication Core will be Powered Down. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_power (void)
 Check if the Communication Core Power was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_osc_sleep (void)
 Enable high frequency crystal oscillator sleep mode, and diable OSC. More...
 
__STATIC_INLINE void ll_pwr_disable_osc_sleep (void)
 Disable high frequency crystal oscillator sleep mode. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_osc_sleep (void)
 Check if the OSC sleep mode was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_radio_sleep (void)
 Enable Radio sleep mode, and disable Radio module. More...
 
__STATIC_INLINE void ll_pwr_disable_radio_sleep (void)
 Disable Radio sleep mode. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_radio_sleep (void)
 Check if the Radio sleep mode was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_comm_core_deep_sleep (void)
 Enable Communication Core Deep Sleep Mode. More...
 
__STATIC_INLINE void ll_pwr_disable_comm_core_deep_sleep (void)
 Disable Communication Core Deep Sleep Mode. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_deep_sleep (void)
 Check if the Communication Core Deep Sleep Mode was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_comm_soft_wakeup_req (void)
 Enable Wake Up Request from Software. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_soft_wakeup_req (void)
 Check if the Wake Up Request was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_enable_comm_core_ext_wakeup (void)
 Enable Communication Core external wakeup. More...
 
__STATIC_INLINE void ll_pwr_disable_comm_core_ext_wakeup (void)
 Disable Communication Core external wakeup. More...
 
__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_ext_wakeup (void)
 Check if the Communication Core external wakeup was enabled or disabled. More...
 
__STATIC_INLINE void ll_pwr_set_comm_core_wakeup_time (uint32_t time)
 Set the time in low_power_clk clock cycles to spend in Deep Sleep Mode before waking-up the device. More...
 
__STATIC_FORCEINLINE uint32_t ll_pwr_get_comm_wakeup_time (void)
 Get the time in low_power_clk clock cycles to spend in Deep Sleep Mode before waking-up the device. More...
 
__STATIC_FORCEINLINE uint32_t ll_pwr_get_comm_sleep_duration (void)
 Get the actual duration of the last deep sleep phase measured in low_power_clk clock cycle. More...
 
__STATIC_INLINE void ll_pwr_set_comm_wakeup_timing (uint32_t twext, uint32_t twosc, uint32_t twrm)
 Set the wakeup timing in low_power_clk clock cycles to spend when waking-up the device. More...
 
__STATIC_INLINE uint32_t ll_pwr_read_comm_wakeup_timing (void)
 Read the wakeup timing in low_power_clk clock cycles to spend when waking-up the device. More...
 
__STATIC_FORCEINLINE uint32_t ll_pwr_read_comm_wakeup_timing_twosc (void)
 Read the Twosc of the wakeup timing in low_power_clk clock cycles to spend when waking-up the device. More...
 

Detailed Description

Function Documentation

◆ ll_pwr_disable_comm_core_deep_sleep()

__STATIC_INLINE void ll_pwr_disable_comm_core_deep_sleep ( void  )

Disable Communication Core Deep Sleep Mode.

Note
Switch Communication Core from sleep mode into normal active mode.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_DEEP_SLEEP_ON

Return values
None

Definition at line 645 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_disable_comm_core_ext_wakeup()

__STATIC_INLINE void ll_pwr_disable_comm_core_ext_wakeup ( void  )

Disable Communication Core external wakeup.

Note
After this configuration, Communication Core cannot be woken up by external wake-up

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_EXTWKUPDSB

Return values
None

Definition at line 720 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_disable_comm_core_power()

__STATIC_INLINE void ll_pwr_disable_comm_core_power ( void  )

Disable the Communication Core Power, the Communication Core will be Powered Down.

Register|BitsName --------|-------- BLE_PWR_CTL | ISO_EN_PD_COMM_CORE BLE_PWR_CTL | PWR_EN_PD_COMM_CORE

Return values
None

Definition at line 513 of file ll_pwr.h.

◆ ll_pwr_disable_comm_core_reset()

__STATIC_INLINE void ll_pwr_disable_comm_core_reset ( void  )

Disable the Communication Core Reset, and set Communication Core to running state.

Note
After powered up, Comm Core need to enter into running mode.

Register|BitsName --------|-------- COMM_CTRL | COMM_CORE_RST_N

Return values
None

Definition at line 419 of file ll_pwr.h.

◆ ll_pwr_disable_comm_timer_power()

__STATIC_INLINE void ll_pwr_disable_comm_timer_power ( void  )

Disable the Communication Timer Power, the Communication Timer will be Powered Down.

Register|BitsName --------|-------- BLE_PWR_CTL | ISO_EN_PD_COMM_TIMER BLE_PWR_CTL | PWR_EN_PD_COMM_TIMER

Return values
None

Definition at line 465 of file ll_pwr.h.

◆ ll_pwr_disable_comm_timer_reset()

__STATIC_INLINE void ll_pwr_disable_comm_timer_reset ( void  )

Disable the Communication Timer Reset, and set Communication Timer to running state.

Note
After powered up, Comm Timer need to enter into running mode.

Register|BitsName --------|-------- COMM_CTRL | COMM_TIMER_RST_N

Return values
None

Definition at line 373 of file ll_pwr.h.

◆ ll_pwr_disable_osc_sleep()

__STATIC_INLINE void ll_pwr_disable_osc_sleep ( void  )

Disable high frequency crystal oscillator sleep mode.

Note
Switch OSC from sleep mode into normal active mode.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_OSC_SLEEP_EN

Return values
None

Definition at line 558 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_disable_radio_sleep()

__STATIC_INLINE void ll_pwr_disable_radio_sleep ( void  )

Disable Radio sleep mode.

Note
Switch Radio from sleep mode into normal active mode.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_RADIO_SLEEP_EN

Return values
None

Definition at line 601 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_enable_comm_core_deep_sleep()

__STATIC_INLINE void ll_pwr_enable_comm_core_deep_sleep ( void  )

Enable Communication Core Deep Sleep Mode.

Note
This bit is reset on DEEP_SLEEP_STAT falling edge.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_DEEP_SLEEP_ON

Return values
None

Definition at line 630 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_enable_comm_core_ext_wakeup()

__STATIC_INLINE void ll_pwr_enable_comm_core_ext_wakeup ( void  )

Enable Communication Core external wakeup.

Note
After this configuration, Communication Core can be woken up by external wake-up

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_EXTWKUPDSB

Return values
None

Definition at line 705 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_enable_comm_core_power()

__STATIC_INLINE void ll_pwr_enable_comm_core_power ( void  )

Enable the Communication Core Power, the Communication Core will be Powered Up.

Register|BitsName --------|-------- BLE_PWR_CTL | ISO_EN_PD_COMM_CORE BLE_PWR_CTL | PWR_EN_PD_COMM_CORE

Return values
None

Definition at line 497 of file ll_pwr.h.

◆ ll_pwr_enable_comm_core_reset()

__STATIC_INLINE void ll_pwr_enable_comm_core_reset ( void  )

Enable the Communication Core Reset.

Note
Comm Core can be reset when all ble connection were disconnected and MCU was ready to enter into deepsleep mode, and When COMM_CORE_RST_N is 0, the ble is held in reset.

Register|BitsName --------|-------- COMM_CTRL | COMM_CORE_RST_N

Return values
None

Definition at line 404 of file ll_pwr.h.

◆ ll_pwr_enable_comm_soft_wakeup_req()

__STATIC_INLINE void ll_pwr_enable_comm_soft_wakeup_req ( void  )

Enable Wake Up Request from Software.

Note
Applies when system is in Deep Sleep Mode. It wakes up the Communication Core when written with a 1. No action happens if it is written with 0.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_SOFT_WAKEUP_REQ

Return values
None

Definition at line 675 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_enable_comm_timer_power()

__STATIC_INLINE void ll_pwr_enable_comm_timer_power ( void  )

Enable the Communication Timer Power, the Communication Timer will be Powered Up.

Register|BitsName --------|-------- BLE_PWR_CTL | ISO_EN_PD_COMM_TIMER BLE_PWR_CTL | PWR_EN_PD_COMM_TIMER

Return values
None

Definition at line 448 of file ll_pwr.h.

◆ ll_pwr_enable_comm_timer_reset()

__STATIC_INLINE void ll_pwr_enable_comm_timer_reset ( void  )

Enable the Communication Timer Reset.

Note
Comm timer can be reset when all ble connection were disconnected and MCU was ready to enter into deepsleep mode.

Register|BitsName --------|-------- COMM_CTRL | COMM_TIMER_RST_N

Return values
None

Definition at line 358 of file ll_pwr.h.

◆ ll_pwr_enable_osc_sleep()

__STATIC_INLINE void ll_pwr_enable_osc_sleep ( void  )

Enable high frequency crystal oscillator sleep mode, and diable OSC.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_OSC_SLEEP_EN

Return values
None

Definition at line 543 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_enable_radio_sleep()

__STATIC_INLINE void ll_pwr_enable_radio_sleep ( void  )

Enable Radio sleep mode, and disable Radio module.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_RADIO_SLEEP_EN

Return values
None

Definition at line 586 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_get_comm_sleep_duration()

__STATIC_FORCEINLINE uint32_t ll_pwr_get_comm_sleep_duration ( void  )

Get the actual duration of the last deep sleep phase measured in low_power_clk clock cycle.

Register|BitsName --------|-------- COMM_TMR_REG | DEEPSLDUR

Return values
Sleepduration

Definition at line 777 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_get_comm_wakeup_time()

__STATIC_FORCEINLINE uint32_t ll_pwr_get_comm_wakeup_time ( void  )

Get the time in low_power_clk clock cycles to spend in Deep Sleep Mode before waking-up the device.

Register|BitsName --------|-------- COMM_TIMER_CFG_0 | AON_COMM_TMR_DEEPSLWKUP_DEEPSLTIME

Return values
Clockcycles to spend in Deep Sleep Mode before waking-up the device

Definition at line 763 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_is_enabled_comm_core_deep_sleep()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_deep_sleep ( void  )

Check if the Communication Core Deep Sleep Mode was enabled or disabled.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_DEEP_SLEEP_ON

Return values
Stateof bit (1 or 0).

Definition at line 659 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_is_enabled_comm_core_ext_wakeup()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_ext_wakeup ( void  )

Check if the Communication Core external wakeup was enabled or disabled.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_EXTWKUPDSB

Return values
Stateof bit (1 or 0).

Definition at line 734 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_is_enabled_comm_core_power()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_power ( void  )

Check if the Communication Core Power was enabled or disabled.

Register|BitsName --------|-------- BLE_PWR_CTL | ISO_EN_PD_COMM_CORE BLE_PWR_CTL | PWR_EN_PD_COMM_CORE

Return values
None

Definition at line 529 of file ll_pwr.h.

◆ ll_pwr_is_enabled_comm_core_reset()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_reset ( void  )

Check if the Communication Core Reset was enabled or disabled.

Register|BitsName --------|-------- COMM_CTRL | COMM_CORE_RST_N

Return values
Stateof bit (1 or 0).

Definition at line 433 of file ll_pwr.h.

◆ ll_pwr_is_enabled_comm_timer_power()

__STATIC_FORCEINLINE uint32_t ll_pwr_is_enabled_comm_timer_power ( void  )

Check if the Communication Timer Power was enabled or disabled.

Register|BitsName --------|-------- BLE_PWR_CTL | ISO_EN_PD_COMM_TIMER BLE_PWR_CTL | PWR_EN_PD_COMM_TIMER

Return values
Stateof bit (1 or 0).

Definition at line 482 of file ll_pwr.h.

◆ ll_pwr_is_enabled_comm_timer_reset()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_timer_reset ( void  )

Check if the Communication Timer Reset was enabled or disabled.

Register|BitsName --------|-------- COMM_CTRL | COMM_TIMER_RST_N

Return values
Stateof bit (1 or 0).

Definition at line 387 of file ll_pwr.h.

◆ ll_pwr_is_enabled_osc_sleep()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_osc_sleep ( void  )

Check if the OSC sleep mode was enabled or disabled.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_OSC_SLEEP_EN

Return values
Stateof bit (1 or 0).

Definition at line 572 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_is_enabled_radio_sleep()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_radio_sleep ( void  )

Check if the Radio sleep mode was enabled or disabled.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_RADIO_SLEEP_EN

Return values
Stateof bit (1 or 0).

Definition at line 615 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_is_enabled_soft_wakeup_req()

__STATIC_INLINE uint32_t ll_pwr_is_enabled_soft_wakeup_req ( void  )

Check if the Wake Up Request was enabled or disabled.

Note
Resets at 0 means request action is performed.

Register|BitsName --------|-------- BLE_PWR_CTL | COMM_DEEPSLCNTL_SOFT_WAKEUP_REQ

Return values
Stateof bit (1 or 0).

Definition at line 690 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_read_comm_wakeup_timing()

__STATIC_INLINE uint32_t ll_pwr_read_comm_wakeup_timing ( void  )

Read the wakeup timing in low_power_clk clock cycles to spend when waking-up the device.

Register|BitsName --------|-------- COMM_TIMER_CFG_1 | TWEXT COMM_TIMER_CFG_1 | TWOSC COMM_TIMER_CFG_1 | TWRM

Return values
COMM_TMR_ENBPRESETRegister value

Definition at line 816 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_read_comm_wakeup_timing_twosc()

__STATIC_FORCEINLINE uint32_t ll_pwr_read_comm_wakeup_timing_twosc ( void  )

Read the Twosc of the wakeup timing in low_power_clk clock cycles to spend when waking-up the device.

Return values
TWOSCvalue

Definition at line 826 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_set_comm_core_wakeup_time()

__STATIC_INLINE void ll_pwr_set_comm_core_wakeup_time ( uint32_t  time)

Set the time in low_power_clk clock cycles to spend in Deep Sleep Mode before waking-up the device.

Register|BitsName --------|-------- COMM_TIMER_CFG_0 | AON_COMM_TMR_DEEPSLWKUP_DEEPSLTIME

Parameters
time32 bit clock cycles loaded into the AON_COMM_TMR_DEEPSLWKUP_DEEPSLTIME
Return values
None

Definition at line 749 of file ll_pwr.h.

References AON_CTL.

◆ ll_pwr_set_comm_wakeup_timing()

__STATIC_INLINE void ll_pwr_set_comm_wakeup_timing ( uint32_t  twext,
uint32_t  twosc,
uint32_t  twrm 
)

Set the wakeup timing in low_power_clk clock cycles to spend when waking-up the device.

Register|BitsName --------|-------- COMM_TIMER_CFG_1 | TWEXT COMM_TIMER_CFG_1 | TWOSC COMM_TIMER_CFG_1 | TWRM

Parameters
twextTime in low power oscillator cycles allowed for stabilization of the high frequency oscillator following an external wake–up request (signal wakeup_req).
twoscTime in low power oscillator cycles allowed for stabilization of the high frequency oscillator when the deep–sleep mode has been left due to sleep–timer expiry.
twrmTime in low power oscillator cycles allowed for the radio module to leave low–power mode.
Return values
None

Definition at line 798 of file ll_pwr.h.

References AON_CTL.