Macros | Functions
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_EXTWKUP_TYPE_LSB (0x01U << AON_EXT_WKUP_CTL_TYPE_Pos)
#define | LL_PWR_EXTWKUP_INVERT_LSB (0x01U << AON_EXT_WKUP_CTL_INVERT_Pos)
#define | LL_PWR_EXTWKUP_SRC_EN_LSB (0x01U << AON_EXT_WKUP_CTL_SRC_EN_Pos)
#define | __LL_PWR_GET_MEM_PWR_MASK(__POWER__)
| PWR_LL_PM_GET_MEM_PWR_MSK PWR Get Memory Power Value Mask. More...
#define | LL_PWR_WKUP_COND_EXT AON_PWR_REG01_WAKE_UP_SEL_EXTWKUP
#define | LL_PWR_WKUP_COND_TIMER AON_PWR_REG01_WAKE_UP_SEL_TIMER
#define | LL_PWR_WKUP_COND_BLE AON_PWR_REG01_WAKE_UP_SEL_BLE
#define | LL_PWR_WKUP_COND_CALENDAR AON_PWR_REG01_WAKE_UP_SEL_CALENDAR
#define | LL_PWR_WKUP_COND_BOD_FEDGE AON_PWR_REG01_WAKE_UP_SEL_PMU_BOD_FEDGE
#define | LL_PWR_WKUP_COND_MSIO_COMP AON_PWR_REG01_WAKE_UP_SEL_MSIO_COMP
#define | LL_PWR_WKUP_COND_ALL AON_PWR_REG01_WAKE_UP_SEL
#define | LL_PWR_WKUP_EVENT_BLE AON_SLP_EVENT_SMCOSCEN
#define | LL_PWR_WKUP_EVENT_TIMER AON_SLP_EVENT_TIMER
#define | LL_PWR_WKUP_EVENT_EXT AON_SLP_EVENT_EXTWKUP
#define | LL_PWR_WKUP_EVENT_BOD_FEDGE AON_SLP_EVENT_PMU_BOD_FEDGE
#define | LL_PWR_WKUP_EVENT_MSIO_COMP AON_SLP_EVENT_PMU_MSIO_COMP
#define | LL_PWR_WKUP_EVENT_WDT AON_SLP_EVENT_WDT_REBOOT
#define | LL_PWR_WKUP_EVENT_CALENDAR AON_SLP_EVENT_CALENDAR_TIMER_ALARM
#define | LL_PWR_WKUP_EVENT_ALL
#define | LL_PWR_EXTWKUP_PIN0 (0x00000001U)
#define | LL_PWR_EXTWKUP_PIN1 (0x00000002U)
#define | LL_PWR_EXTWKUP_PIN2 (0x00000004U)
#define | LL_PWR_EXTWKUP_PIN3 (0x00000008U)
#define | LL_PWR_EXTWKUP_PIN4 (0x00000010U)
#define | LL_PWR_EXTWKUP_PIN5 (0x00000020U)
#define | LL_PWR_EXTWKUP_PIN6 (0x00000040U)
#define | LL_PWR_EXTWKUP_PIN7 (0x00000080U)
#define | LL_PWR_EXTWKUP_PIN_ALL (0x000000FFU)
#define | LL_PWR_EXTWKUP_TYPE_LOW (LL_PWR_EXTWKUP_INVERT_LSB | LL_PWR_EXTWKUP_TYPE_LSB | LL_PWR_EXTWKUP_SRC_EN_LSB)
#define | LL_PWR_EXTWKUP_TYPE_HIGH (LL_PWR_EXTWKUP_TYPE_LSB | LL_PWR_EXTWKUP_SRC_EN_LSB)
#define | LL_PWR_EXTWKUP_TYPE_RISING (0x00000000U)
#define | LL_PWR_EXTWKUP_TYPE_FALLING (LL_PWR_EXTWKUP_INVERT_LSB | LL_PWR_EXTWKUP_SRC_EN_LSB)
#define | LL_PWR_CMD_LOOPBACK AON_PSC_CMD_OPC_OPCODE_LOOPBACK
#define | LL_PWR_CMD_EF_DIR_ON AON_PSC_CMD_OPC_OPCODE_EF_DIR_ON
#define | LL_PWR_CMD_32_TIMER_LD AON_PSC_CMD_OPC_OPCODE_32_TIMER_LD
#define | LL_PWR_CMD_DEEP_SLEEP AON_PSC_CMD_OPC_OPCODE_DEEP_SLEEP
#define | LL_PWR_CMD_EF_DIR_OFF AON_PSC_CMD_OPC_OPCODE_EF_DIR_OFF
#define | LL_PWR_CMD_EXT_CLK AON_PSC_CMD_OPC_OPCODE_EXT_CLK
#define | LL_PWR_CMD_RNG_CLK AON_PSC_CMD_OPC_OPCODE_RNG_CLK
#define | LL_PWR_CMD_RTC_CLK AON_PSC_CMD_OPC_OPCODE_RTC_CLK
#define | LL_PWR_CMD_RNG2_CLK AON_PSC_CMD_OPC_OPCODE_RNG2_CLK
#define | LL_PWR_CMD_LD_MEM_SLP_CFG AON_PSC_CMD_OPC_OPCODE_LD_MEM_SLP_CFG
#define | LL_PWR_CMD_LD_MEM_WKUP_CFG AON_PSC_CMD_OPC_OPCODE_LD_MEM_WKUP_CFG
#define | LL_PWR_CMD_DPAD_LE_HI AON_PSC_CMD_OPC_OPCODE_DPAD_LE_HI
#define | LL_PWR_CMD_DPAD_LE_LO AON_PSC_CMD_OPC_OPCODE_DPAD_LE_LO
#define | LL_PWR_CMD_SLP_TIMER_MODE_NORMAL AON_PSC_CMD_OPC_OPCODE_SLP_TIMER_MODE_0
#define | LL_PWR_CMD_SLP_TIMER_MODE_SINGLE AON_PSC_CMD_OPC_OPCODE_SLP_TIMER_MODE_1
#define | LL_PWR_CMD_SLP_TIMER_MODE_RELOAD AON_PSC_CMD_OPC_OPCODE_SLP_TIMER_MODE_2
#define | LL_PWR_CMD_SLP_TIMER_MODE_DISABLE AON_PSC_CMD_OPC_OPCODE_SLP_TIMER_MODE_3
#define | LL_PWR_DPAD_LE_OFF (0x00000000U)
#define | LL_PWR_DPAD_LE_ON (0x00000001U)
#define | LL_PWR_TIMER_READ_SEL_CAL_TIMER AON_PAD_CTL1_TIMER_READ_SEL_CAL_TIMER
#define | LL_PWR_TIMER_READ_SEL_AON_WDT AON_PAD_CTL1_TIMER_READ_SEL_AON_WDT
#define | LL_PWR_TIMER_READ_SEL_SLP_TIMER AON_PAD_CTL1_TIMER_READ_SEL_SLP_TIMER
#define | LL_PWR_TIMER_READ_SEL_CAL_ALARM AON_PAD_CTL1_TIMER_READ_SEL_CAL_ALARM
#define | LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(AON->__REG__, (__VALUE__))
| Write a value in PWR register. More...
#define | LL_PWR_ReadReg(__REG__) READ_REG(AON->__REG__)
| Read a value in PWR register. More...

## 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...
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_set_timer_read_select (uint32_t select)
| Select which timer value to read. More...
SECTION_RAM_CODE __STATIC_INLINE uint32_t | ll_pwr_get_timer_read_select (void)
| Get which timer value was selected to read. More...
SECTION_RAM_CODE __STATIC_INLINE uint32_t | ll_pwr_get_timer_read_value (void)
| Get current timer value based on the selection. 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_psc_cmd_busy (void)
| Indicate if the Power State Controller is in busy state. 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...

## 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.