gr55xx_ll_pwr.h File Reference

Header file containing functions prototypes of PWR LL library. More...

#include "gr55xx.h"

Go to the source code of this file.

Macros

#define LL_PWR_WKUP_COND_EXT   AON_CTL_MCU_WAKEUP_CTRL_EXT
 
#define LL_PWR_WKUP_COND_TIMER   AON_CTL_MCU_WAKEUP_CTRL_SLP_TIMER
 
#define LL_PWR_WKUP_COND_BLE   AON_CTL_MCU_WAKEUP_CTRL_SMS_OSC
 
#define LL_PWR_WKUP_COND_CLDR   AON_CTL_MCU_WAKEUP_CTRL_RTC0
 
#define LL_PWR_WKUP_COND_CLDR_TICK   AON_CTL_MCU_WAKEUP_CTRL_RTC1
 
#define LL_PWR_WKUP_COND_BOD_FEDGE   AON_CTL_MCU_WAKEUP_CTRL_PMU_BOD
 
#define LL_PWR_WKUP_COND_AUSB   AON_CTL_MCU_WAKEUP_CTRL_USB_ATTACH
 
#define LL_PWR_WKUP_COND_DUSB   AON_CTL_MCU_WAKEUP_CTRL_USB_DETACH
 
#define LL_PWR_WKUP_COND_BLE_IRQ   AON_CTL_MCU_WAKEUP_CTRL_BLE_IRQ
 
#define LL_PWR_WKUP_COND_AON_WDT   AON_CTL_MCU_WAKEUP_CTRL_AON_WDT
 
#define LL_PWR_WKUP_COND_COMP   AON_CTL_MCU_WAKEUP_CTRL_PMU_COMP
 
#define LL_PWR_WKUP_COND_ALL   (0xFFFU << AON_CTL_MCU_WAKEUP_CTRL_SLP_TIMER_Pos)
 
#define LL_PWR_WKUP_EVENT_BLE   AON_CTL_SLP_EVENT_SMS_OSC
 
#define LL_PWR_WKUP_EVENT_TIMER   AON_CTL_SLP_EVENT_SLP_TIMER
 
#define LL_PWR_WKUP_EVENT_EXT   AON_CTL_SLP_EVENT_EXT
 
#define LL_PWR_WKUP_EVENT_BOD_FEDGE   AON_CTL_SLP_EVENT_PMU_BOD
 
#define LL_PWR_WKUP_EVENT_MSIO_COMP   AON_CTL_SLP_EVENT_PMU_MSIO
 
#define LL_PWR_WKUP_EVENT_WDT   AON_CTL_SLP_EVENT_AON_WDT
 
#define LL_PWR_WKUP_EVENT_CLDR   AON_CTL_SLP_EVENT_RTC0
 
#define LL_PWR_WKUP_EVENT_AUSB   AON_CTL_SLP_EVENT_USB_ATTACH
 
#define LL_PWR_WKUP_EVENT_DUSB   AON_CTL_SLP_EVENT_USB_DETACH
 
#define LL_PWR_WKUP_EVENT_CLDR_TICK   AON_CTL_SLP_EVENT_RTC1
 
#define LL_PWR_WKUP_EVENT_BLE_IRQ   AON_CTL_SLP_EVENT_BLE_IRQ
 
#define LL_PWR_WKUP_EVENT_ALL   (0xFFFU << AON_CTL_SLP_EVENT_SLP_TIMER_Pos)
 
#define LL_PWR_DPAD_LE_OFF   (0x00000000U)
 
#define LL_PWR_DPAD_LE_ON   (0x00000001U)
 

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 void ll_pwr_clear_wakeup_condition (uint32_t condition)
 Clear 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_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_read_value (void)
 Read the AON Sleep Timer counter current value. 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_enable_comm_timer_reset (void)
 Enable the Communication Timer Reset. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_comm_timer_reset (void)
 Disable the Communication Timer Reset, and set Communication Timer to running state. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_timer_reset (void)
 Check if the Communication Timer Reset was enabled or disabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_comm_core_reset (void)
 Enable the Communication Core Reset. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_comm_core_reset (void)
 Disable the Communication Core Reset, and set Communication Core to running state. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_reset (void)
 Check if the Communication Core Reset was enabled or disabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_comm_timer_power (void)
 Enable the Communication Timer Power, the Communication Timer will be Powered Up. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_comm_timer_power (void)
 Disable the Communication Timer Power, the Communication Timer will be Powered Down. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_timer_power (void)
 Check if the Communication Timer Power was enabled or disabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_comm_core_power (void)
 Enable the Communication Core Power, the Communication Core will be Powered Up. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_comm_core_power (void)
 Disable the Communication Core Power, the Communication Core will be Powered Down. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_comm_core_power (void)
 Check if the Communication Core Power was enabled or disabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_osc_sleep (void)
 Enable high frequency crystal oscillator sleep mode, and diable OSC. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_osc_sleep (void)
 Disable high frequency crystal oscillator sleep mode. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_osc_sleep (void)
 Check if the OSC sleep mode was enabled or disabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_radio_sleep (void)
 Enable Radio sleep mode, and disable Radio module. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_radio_sleep (void)
 Disable Radio sleep mode. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_radio_sleep (void)
 Check if the Radio sleep mode was enabled or disabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_comm_core_deep_sleep (void)
 Enable Communication Core Deep Sleep Mode. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_comm_core_deep_sleep (void)
 Disable Communication Core Deep Sleep Mode. More...
 
SECTION_RAM_CODE __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...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_comm_soft_wakeup_req (void)
 Enable Wake Up Request from Software. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_enabled_soft_wakeup_req (void)
 Check if the Wake Up Request was enabled or disabled. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_enable_comm_core_ext_wakeup (void)
 Enable Communication Core external wakeup. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_comm_core_ext_wakeup (void)
 Disable Communication Core external wakeup. More...
 
SECTION_RAM_CODE __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...
 
SECTION_RAM_CODE __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...
 
SECTION_RAM_CODE __STATIC_INLINE 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...
 
SECTION_RAM_CODE __STATIC_INLINE 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...
 
SECTION_RAM_CODE __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...
 
SECTION_RAM_CODE __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...
 
SECTION_RAM_CODE __STATIC_INLINE 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...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_get_ext_wakeup_status (void)
 Get the External Wake Up Status. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_clear_ext_wakeup_status (uint32_t wakeup_pin)
 Clear the External Wake Up Status. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_clear_wakeup_event (uint32_t event)
 Clear the Event that triggered the DeepSleep WakeUp. More...
 
SECTION_RAM_CODE __STATIC_INLINE uint32_t ll_pwr_is_active_flag_comm_deep_sleep_stat (void)
 Indicate if the Communication Core is in Deep Sleep Mode. More...
 
SECTION_RAM_CODE __STATIC_INLINE void ll_pwr_disable_cache_module (void)
 Disable cache function. More...
 
__STATIC_INLINE void ll_pwr_set_dcdc_prepare_timing (uint32_t value)
 Set DCDC prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_dig_ldo_prepare_timing (uint32_t value)
 Set digtal LDO prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_fast_ldo_prepare_timing (uint32_t value)
 Set fast LDO prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_hf_osc_prepare_timing (uint32_t value)
 Set HF OSC prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_pll_lock_timing (uint32_t value)
 Set PLL lock prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_pll_prepare_timing (uint32_t value)
 Set PLL prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_pwr_switch_prepare_timing (uint32_t value)
 Set power switch prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_xo_prepare_timing (uint32_t value)
 Set Set XO prepare timing. More...
 
__STATIC_INLINE void ll_pwr_set_xo_bias_switch_timing (uint32_t value)
 Set Set XO Bias switch timing. More...
 
__STATIC_INLINE void ll_pwr_enable_fast_ldo_pwr_mode (void)
 Enable Fast LDO power mode. More...
 
__STATIC_INLINE void ll_pwr_turn_on_dcdc_after_wakeup (void)
 Turn on DCDC after wakeup. More...
 
__STATIC_INLINE void ll_pwr_turn_off_fast_ldo_in_regular_boot (void)
 Keep turn off Fast LDO in regular boot. More...
 
__STATIC_INLINE void ll_pwr_turn_off_enable_xo_pll_after_dcdc_ready (void)
 Turn off enable xo/pll in warm boot. More...
 
__STATIC_INLINE void ll_pwr_turn_on_enable_xo_pll_after_dcdc_ready (void)
 Turn on enable xo/pll in srpg. More...
 

Detailed Description

Header file containing functions prototypes of PWR LL library.

Author
BLE Driver Team
Attention
#####Copyright (c) 2019 GOODIX All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file gr55xx_ll_pwr.h.