HPM SDK
HPMicro Software Development Kit
hpm_pcfg_drv.h File Reference
#include "hpm_common.h"
#include "hpm_pcfg_regs.h"

Go to the source code of this file.

Data Structures

struct  pcfg_irc24m_config_t
 

Macros

#define PCFG_CLOCK_GATE_MODE_ALWAYS_ON   (0x3UL)
 
#define PCFG_CLOCK_GATE_MODE_ALWAYS_OFF   (0x2UL)
 
#define PCFG_PERIPH_KEEP_CLOCK_ON(p)   (PCFG_CLOCK_GATE_MODE_ALWAYS_ON << (p))
 
#define PCFG_PERIPH_KEEP_CLOCK_OFF(p)   (PCFG_CLOCK_GATE_MODE_ALWAYS_OFF << (p))
 
#define PCFG_CLOCK_GATE_CONTROL_MASK(module, mode)    ((uint32_t) (mode) << ((module) << 1))
 
#define PCFG_DEBUG_STOP_SOURCE_ENABLE_CORE0   (PCFG_DEBUG_STOP_CPU0_MASK)
 
#define PCFG_DEBUG_STOP_SOURCE_DISABLE_CORE0   (0)
 
#define PCFG_DEBUG_STOP_SOURCE_ENABLE_CORE1   (PCFG_DEBUG_STOP_CPU1_MASK)
 
#define PCFG_DEBUG_STOP_SOURCE_DISABLE_CORE1   (0)
 

Enumerations

enum  pcfg_irc24m_reference_t {
  pcfg_irc24m_reference_32k = 0 , pcfg_irc24m_reference_24m_xtal = 1 , pcfg_irc24m_reference_32k = 0 , pcfg_irc24m_reference_24m_xtal = 1 ,
  pcfg_irc24m_reference_32k = 0 , pcfg_irc24m_reference_24m_xtal = 1 , pcfg_irc24m_reference_32k = 0 , pcfg_irc24m_reference_24m_xtal = 1 ,
  pcfg_irc24m_reference_32k = 0 , pcfg_irc24m_reference_24m_xtal = 1 , pcfg_irc24m_reference_32k = 0 , pcfg_irc24m_reference_24m_xtal = 1 ,
  pcfg_irc24m_reference_32k = 0 , pcfg_irc24m_reference_24m_xtal = 1
}
 
enum  pcfg_dcdc_lp_current_limit_t {
  pcfg_dcdc_lp_current_limit_250ma = 0 , pcfg_dcdc_lp_current_limit_200ma = 1 , pcfg_dcdc_lp_current_limit_250ma = 0 , pcfg_dcdc_lp_current_limit_200ma = 1 ,
  pcfg_dcdc_lp_current_limit_250ma = 0 , pcfg_dcdc_lp_current_limit_200ma = 1 , pcfg_dcdc_lp_current_limit_250ma = 0 , pcfg_dcdc_lp_current_limit_200ma = 1 ,
  pcfg_dcdc_lp_current_limit_250ma = 0 , pcfg_dcdc_lp_current_limit_200ma = 1 , pcfg_dcdc_lp_current_limit_250ma = 0 , pcfg_dcdc_lp_current_limit_200ma = 1 ,
  pcfg_dcdc_lp_current_limit_250ma = 0 , pcfg_dcdc_lp_current_limit_200ma = 1
}
 
enum  pcfg_dcdc_current_hys_t {
  pcfg_dcdc_current_hys_12_5mv = 0 , pcfg_dcdc_current_hys_25mv = 1 , pcfg_dcdc_current_hys_12_5mv = 0 , pcfg_dcdc_current_hys_25mv = 1 ,
  pcfg_dcdc_current_hys_12_5mv = 0 , pcfg_dcdc_current_hys_25mv = 1 , pcfg_dcdc_current_hys_12_5mv = 0 , pcfg_dcdc_current_hys_25mv = 1 ,
  pcfg_dcdc_current_hys_12_5mv = 0 , pcfg_dcdc_current_hys_25mv = 1 , pcfg_dcdc_current_hys_12_5mv = 0 , pcfg_dcdc_current_hys_25mv = 1 ,
  pcfg_dcdc_current_hys_12_5mv = 0 , pcfg_dcdc_current_hys_25mv = 1
}
 
enum  pcfg_dcdc_mode_t {
  pcfg_dcdc_mode_off = 0 , pcfg_dcdc_mode_basic = 1 , pcfg_dcdc_mode_general = 3 , pcfg_dcdc_mode_expert = 7 ,
  pcfg_dcdc_mode_off = 0 , pcfg_dcdc_mode_basic = 1 , pcfg_dcdc_mode_general = 3 , pcfg_dcdc_mode_expert = 7 ,
  pcfg_dcdc_mode_off = 0 , pcfg_dcdc_mode_basic = 1 , pcfg_dcdc_mode_general = 3 , pcfg_dcdc_mode_expert = 7 ,
  pcfg_dcdc_mode_off = 0 , pcfg_dcdc_mode_basic = 1 , pcfg_dcdc_mode_general = 3 , pcfg_dcdc_mode_expert = 7 ,
  pcfg_dcdc_mode_off = 0 , pcfg_dcdc_mode_basic = 1 , pcfg_dcdc_mode_general = 3 , pcfg_dcdc_mode_expert = 7 ,
  pcfg_dcdc_mode_off = 0 , pcfg_dcdc_mode_basic = 1 , pcfg_dcdc_mode_general = 3 , pcfg_dcdc_mode_expert = 7 ,
  pcfg_dcdc_mode_off = 0 , pcfg_dcdc_mode_basic = 1 , pcfg_dcdc_mode_general = 3 , pcfg_dcdc_mode_expert = 7
}
 
enum  pcfg_pmc_periph_t {
  pcfg_pmc_periph_gpio = 6 , pcfg_pmc_periph_ioc = 8 , pcfg_pmc_periph_timer = 10 , pcfg_pmc_periph_wdog = 12 ,
  pcfg_pmc_periph_uart = 14 , pcfg_pmc_periph_gpio = 6 , pcfg_pmc_periph_ioc = 8 , pcfg_pmc_periph_timer = 10 ,
  pcfg_pmc_periph_wdog = 12 , pcfg_pmc_periph_uart = 14 , pcfg_pmc_periph_fuse = 0 , pcfg_pmc_periph_ram = 2 ,
  pcfg_pmc_periph_vad = 4 , pcfg_pmc_periph_gpio = 6 , pcfg_pmc_periph_ioc = 8 , pcfg_pmc_periph_timer = 10 ,
  pcfg_pmc_periph_wdog = 12 , pcfg_pmc_periph_uart = 14 , pcfg_pmc_periph_debug = 16 , pcfg_pmc_periph_fuse = 0 ,
  pcfg_pmc_periph_ram = 2 , pcfg_pmc_periph_vad = 4 , pcfg_pmc_periph_gpio = 6 , pcfg_pmc_periph_ioc = 8 ,
  pcfg_pmc_periph_timer = 10 , pcfg_pmc_periph_wdog = 12 , pcfg_pmc_periph_uart = 14 , pcfg_pmc_periph_debug = 16 ,
  pcfg_pmc_periph_fuse = 0 , pcfg_pmc_periph_ram = 2 , pcfg_pmc_periph_vad = 4 , pcfg_pmc_periph_gpio = 6 ,
  pcfg_pmc_periph_ioc = 8 , pcfg_pmc_periph_timer = 10 , pcfg_pmc_periph_wdog = 12 , pcfg_pmc_periph_uart = 14 ,
  pcfg_pmc_periph_debug = 16 , pcfg_pmc_periph_gpio = 6 , pcfg_pmc_periph_ioc = 8 , pcfg_pmc_periph_timer = 10 ,
  pcfg_pmc_periph_wdog = 12 , pcfg_pmc_periph_uart = 14 , pcfg_pmc_periph_vad = 16 , pcfg_pmc_periph_pmic_mem = 18 ,
  pcfg_pmc_periph_gpio = 6 , pcfg_pmc_periph_ioc = 8 , pcfg_pmc_periph_timer = 10 , pcfg_pmc_periph_wdog = 12 ,
  pcfg_pmc_periph_uart = 14
}
 
enum  pcfg_wakeup_src_t {
  pcfg_wakeup_src_puart = (1 << 7) , pcfg_wakeup_src_ptimer = (1 << 8) , pcfg_wakeup_src_pwdg = (1 << 9) , pcfg_wakeup_src_pgpio = (1 << 10) ,
  pcfg_wakeup_src_puart = (1 << 7) , pcfg_wakeup_src_ptimer = (1 << 8) , pcfg_wakeup_src_pwdg = (1 << 9) , pcfg_wakeup_src_pgpio = (1 << 10) ,
  pcfg_wakeup_src_otp = (1 << 4) , pcfg_wakeup_src_puart = (1 << 7) , pcfg_wakeup_src_ptimer = (1 << 8) , pcfg_wakeup_src_pwdg = (1 << 9) ,
  pcfg_wakeup_src_pgpio = (1 << 10) , pcfg_wakeup_src_otp = (1 << 4) , pcfg_wakeup_src_puart = (1 << 7) , pcfg_wakeup_src_ptimer = (1 << 8) ,
  pcfg_wakeup_src_pwdg = (1 << 9) , pcfg_wakeup_src_pgpio = (1 << 10) , pcfg_wakeup_src_otp = (1 << 4) , pcfg_wakeup_src_puart = (1 << 7) ,
  pcfg_wakeup_src_ptimer = (1 << 8) , pcfg_wakeup_src_pwdg = (1 << 9) , pcfg_wakeup_src_pgpio = (1 << 10) , pcfg_wakeup_src_puart = (1 << 7) ,
  pcfg_wakeup_src_ptimer = (1 << 8) , pcfg_wakeup_src_pwdg = (1 << 9) , pcfg_wakeup_src_pgpio = (1 << 10) , pcfg_wakeup_src_puart = (1 << 7) ,
  pcfg_wakeup_src_ptimer = (1 << 8) , pcfg_wakeup_src_pwdg = (1 << 9) , pcfg_wakeup_src_pgpio = (1 << 10)
}
 
enum  { status_pcfg_ldo_out_of_range = MAKE_STATUS(status_group_pcfg, 1) }
 

Functions

static void pcfg_bandgap_disable_power_save_mode (PCFG_Type *ptr)
 bandgap disable power save mode More...
 
static void pcfg_bandgap_enable_power_save_mode (PCFG_Type *ptr)
 bandgap enable power save mode More...
 
static void pcfg_bandgap_disable_lowpower_mode (PCFG_Type *ptr)
 bandgap disable power save mode More...
 
static void pcfg_bandgap_enable_lowpower_mode (PCFG_Type *ptr)
 bandgap enable low power mode More...
 
static bool pcfg_bandgap_is_trimmed (PCFG_Type *ptr)
 check if bandgap is trimmed or not More...
 
static void pcfg_bandgap_reload_trim (PCFG_Type *ptr)
 bandgap reload trim value More...
 
static void pcfg_ldo2p5_turn_off (PCFG_Type *ptr)
 turn off LDO2P5 More...
 
static void pcfg_ldo2p5_turn_on (PCFG_Type *ptr)
 turn on LDO 2.5V More...
 
static bool pcfg_ldo2p5_is_stable (PCFG_Type *ptr)
 check if LDO 2.5V is stable More...
 
static bool pcfg_dcdc_is_stable (PCFG_Type *ptr)
 
static void pcfg_dcdc_set_mode (PCFG_Type *ptr, uint8_t mode)
 
static void pcfg_dcdc_set_lp_current_limit (PCFG_Type *ptr, pcfg_dcdc_lp_current_limit_t limit, bool over_limit)
 set low power current limit More...
 
static void pcfg_dcdc_disable_power_loss_prot (PCFG_Type *ptr)
 disable power loss protection More...
 
static void pcfg_dcdc_enable_power_loss_prot (PCFG_Type *ptr)
 enable power loss protection More...
 
static bool pcfg_dcdc_is_power_loss (PCFG_Type *ptr)
 check if power loss flag is set More...
 
static void pcfg_dcdc_disable_over_voltage_prot (PCFG_Type *ptr)
 disable over voltage protection More...
 
static void pcfg_dcdc_ensable_over_voltage_prot (PCFG_Type *ptr)
 enable over voltage protection More...
 
static bool pcfg_dcdc_is_over_voltage (PCFG_Type *ptr)
 checkover voltage flag More...
 
static void pcfg_dcdc_disable_measure_current (PCFG_Type *ptr)
 disable current measurement More...
 
static void pcfg_dcdc_enable_measure_current (PCFG_Type *ptr)
 enable current measurement More...
 
static bool pcfg_dcdc_is_measure_current_valid (PCFG_Type *ptr)
 check if measured current is valid More...
 
static uint32_t pcfg_dcdc_get_start_time_in_cycle (PCFG_Type *ptr)
 get DCDC start time in number of 24MHz clock cycles More...
 
static uint32_t pcfg_dcdc_get_resume_time_in_cycle (PCFG_Type *ptr)
 get DCDC resume time in number of 24MHz clock cycles More...
 
static void pcfg_dcdc_set_start_time_in_cycle (PCFG_Type *ptr, uint32_t cycles)
 set DCDC start time in 24MHz clock cycles More...
 
static void pcfg_dcdc_set_resume_time_in_cycle (PCFG_Type *ptr, uint32_t cycles)
 set DCDC resuem time in 24MHz clock cycles More...
 
static void pcfg_disable_power_trap (PCFG_Type *ptr)
 disable power trap More...
 
static void pcfg_enable_power_trap (PCFG_Type *ptr)
 enable power trap More...
 
static bool pcfg_is_power_trap_triggered (PCFG_Type *ptr)
 check if power trap is triggered More...
 
static void pcfg_clear_power_trap_trigger_flag (PCFG_Type *ptr)
 clear power trap trigger flag More...
 
static void pcfg_disable_dcdc_retention (PCFG_Type *ptr)
 disable dcdc retention More...
 
static void pcfg_enable_dcdc_retention (PCFG_Type *ptr)
 enable dcdc retention to retain soc sram data More...
 
static void pcfg_clear_wakeup_cause (PCFG_Type *ptr, uint32_t mask)
 clear wakeup cause flag More...
 
static uint32_t pcfg_get_wakeup_cause (PCFG_Type *ptr)
 get wakeup cause More...
 
static void pcfg_enable_wakeup_source (PCFG_Type *ptr, uint32_t mask)
 enable wakeup source More...
 
static void pcfg_disable_wakeup_source (PCFG_Type *ptr, uint32_t mask)
 disable wakeup source More...
 
static void pcfg_set_periph_clock_mode (PCFG_Type *ptr, uint32_t mode)
 set clock gate mode in vpmc domain More...
 
static void pcfg_update_periph_clock_mode (PCFG_Type *ptr, pcfg_pmc_periph_t periph, bool on)
 update clock gate mode in vpmc domain More...
 
static void pcfg_disable_cpu0_debug_stop_notfication (PCFG_Type *ptr)
 Disable CPU0 debug stop notficiation to peripherals. More...
 
static void pcfg_enable_cpu0_debug_stop_notfication (PCFG_Type *ptr)
 Enable CPU0 debug stop notification to peripherals. More...
 
static void pcfg_disable_cpu1_debug_stop_notfication (PCFG_Type *ptr)
 Disable CPU1 debug stop notification to peripherals. More...
 
static void pcfg_enable_cpu1_debug_stop_notfication (PCFG_Type *ptr)
 Enable CPU1 debug stop notification to peripherals. More...
 
static void pcfg_config_debug_stop_notification (PCFG_Type *ptr, uint8_t mask)
 Configure CPU core debug stop notification to peripherals. More...
 
static bool pcfg_irc24m_is_trimmed (PCFG_Type *ptr)
 check if irc24m is trimmed More...
 
static void pcfg_irc24m_reload_trim (PCFG_Type *ptr)
 reload irc24m trim value More...
 
void pcfg_irc24m_config_track (PCFG_Type *ptr, pcfg_irc24m_config_t *config)
 config irc24m track More...
 
hpm_stat_t pcfg_dcdc_set_lpmode_voltage (PCFG_Type *ptr, uint16_t mv)
 
hpm_stat_t pcfg_ldo2p5_set_voltage (PCFG_Type *ptr, uint16_t mv)
 
hpm_stat_t pcfg_dcdc_set_voltage (PCFG_Type *ptr, uint16_t mv)
 
hpm_stat_t pcfg_ldo1p1_set_voltage (PCFG_Type *ptr, uint16_t mv)
 
uint16_t pcfg_dcdc_get_current_level (PCFG_Type *ptr)
 

Function Documentation

◆ pcfg_bandgap_disable_lowpower_mode()

static void pcfg_bandgap_disable_lowpower_mode ( PCFG_Type ptr)
inlinestatic

bandgap disable power save mode

Parameters
[in]ptrbase address

◆ pcfg_bandgap_disable_power_save_mode()

static void pcfg_bandgap_disable_power_save_mode ( PCFG_Type ptr)
inlinestatic

bandgap disable power save mode

Parameters
[in]ptrbase address

◆ pcfg_bandgap_enable_lowpower_mode()

static void pcfg_bandgap_enable_lowpower_mode ( PCFG_Type ptr)
inlinestatic

bandgap enable low power mode

Parameters
[in]ptrbase address

◆ pcfg_bandgap_enable_power_save_mode()

static void pcfg_bandgap_enable_power_save_mode ( PCFG_Type ptr)
inlinestatic

bandgap enable power save mode

Parameters
[in]ptrbase address

◆ pcfg_bandgap_is_trimmed()

static bool pcfg_bandgap_is_trimmed ( PCFG_Type ptr)
inlinestatic

check if bandgap is trimmed or not

Parameters
[in]ptrbase address
Return values
trueif bandgap is trimmed

◆ pcfg_bandgap_reload_trim()

static void pcfg_bandgap_reload_trim ( PCFG_Type ptr)
inlinestatic

bandgap reload trim value

Parameters
[in]ptrbase address

◆ pcfg_clear_power_trap_trigger_flag()

static void pcfg_clear_power_trap_trigger_flag ( PCFG_Type ptr)
inlinestatic

clear power trap trigger flag

Parameters
[in]ptrbase address

◆ pcfg_clear_wakeup_cause()

static void pcfg_clear_wakeup_cause ( PCFG_Type ptr,
uint32_t  mask 
)
inlinestatic

clear wakeup cause flag

Parameters
[in]ptrbase address
[in]maskmask of flags to be cleared

◆ pcfg_config_debug_stop_notification()

static void pcfg_config_debug_stop_notification ( PCFG_Type ptr,
uint8_t  mask 
)
inlinestatic

Configure CPU core debug stop notification to peripherals.

Parameters
[in]ptr
[in]mask

◆ pcfg_dcdc_disable_measure_current()

static void pcfg_dcdc_disable_measure_current ( PCFG_Type ptr)
inlinestatic

disable current measurement

Parameters
[in]ptrbase address

◆ pcfg_dcdc_disable_over_voltage_prot()

static void pcfg_dcdc_disable_over_voltage_prot ( PCFG_Type ptr)
inlinestatic

disable over voltage protection

Parameters
[in]ptrbase address

◆ pcfg_dcdc_disable_power_loss_prot()

static void pcfg_dcdc_disable_power_loss_prot ( PCFG_Type ptr)
inlinestatic

disable power loss protection

Parameters
[in]ptrbase address

◆ pcfg_dcdc_enable_measure_current()

static void pcfg_dcdc_enable_measure_current ( PCFG_Type ptr)
inlinestatic

enable current measurement

Parameters
[in]ptrbase address

◆ pcfg_dcdc_enable_power_loss_prot()

static void pcfg_dcdc_enable_power_loss_prot ( PCFG_Type ptr)
inlinestatic

enable power loss protection

Parameters
[in]ptrbase address

◆ pcfg_dcdc_ensable_over_voltage_prot()

static void pcfg_dcdc_ensable_over_voltage_prot ( PCFG_Type ptr)
inlinestatic

enable over voltage protection

Parameters
[in]ptrbase address

◆ pcfg_dcdc_get_resume_time_in_cycle()

static uint32_t pcfg_dcdc_get_resume_time_in_cycle ( PCFG_Type ptr)
inlinestatic

get DCDC resume time in number of 24MHz clock cycles

Parameters
[in]ptrbase address
Return values
dcdcresuem time in cycles

◆ pcfg_dcdc_get_start_time_in_cycle()

static uint32_t pcfg_dcdc_get_start_time_in_cycle ( PCFG_Type ptr)
inlinestatic

get DCDC start time in number of 24MHz clock cycles

Parameters
[in]ptrbase address
Return values
dcdcstart time in cycles

◆ pcfg_dcdc_is_measure_current_valid()

static bool pcfg_dcdc_is_measure_current_valid ( PCFG_Type ptr)
inlinestatic

check if measured current is valid

Parameters
[in]ptrbase address
Return values
trueif measured current is valid

◆ pcfg_dcdc_is_over_voltage()

static bool pcfg_dcdc_is_over_voltage ( PCFG_Type ptr)
inlinestatic

checkover voltage flag

Parameters
[in]ptrbase address
Return values
trueif flag is set

◆ pcfg_dcdc_is_power_loss()

static bool pcfg_dcdc_is_power_loss ( PCFG_Type ptr)
inlinestatic

check if power loss flag is set

Parameters
[in]ptrbase address
Return values
trueif power loss is set

◆ pcfg_dcdc_is_stable()

static bool pcfg_dcdc_is_stable ( PCFG_Type ptr)
inlinestatic

◆ pcfg_dcdc_set_lp_current_limit()

static void pcfg_dcdc_set_lp_current_limit ( PCFG_Type ptr,
pcfg_dcdc_lp_current_limit_t  limit,
bool  over_limit 
)
inlinestatic

set low power current limit

Parameters
[in]ptrbase address
[in]limitcurrent limit at low power mode
[in]over_limitunused parameter, will be discarded

◆ pcfg_dcdc_set_mode()

static void pcfg_dcdc_set_mode ( PCFG_Type ptr,
uint8_t  mode 
)
inlinestatic

◆ pcfg_dcdc_set_resume_time_in_cycle()

static void pcfg_dcdc_set_resume_time_in_cycle ( PCFG_Type ptr,
uint32_t  cycles 
)
inlinestatic

set DCDC resuem time in 24MHz clock cycles

Parameters
[in]ptrbase address
[in]cyclesresume time in cycles

◆ pcfg_dcdc_set_start_time_in_cycle()

static void pcfg_dcdc_set_start_time_in_cycle ( PCFG_Type ptr,
uint32_t  cycles 
)
inlinestatic

set DCDC start time in 24MHz clock cycles

Parameters
[in]ptrbase address
[in]cyclesstart time in cycles

◆ pcfg_disable_cpu0_debug_stop_notfication()

static void pcfg_disable_cpu0_debug_stop_notfication ( PCFG_Type ptr)
inlinestatic

Disable CPU0 debug stop notficiation to peripherals.

Parameters
[in]ptr

◆ pcfg_disable_cpu1_debug_stop_notfication()

static void pcfg_disable_cpu1_debug_stop_notfication ( PCFG_Type ptr)
inlinestatic

Disable CPU1 debug stop notification to peripherals.

Parameters
[in]ptr

◆ pcfg_disable_dcdc_retention()

static void pcfg_disable_dcdc_retention ( PCFG_Type ptr)
inlinestatic

disable dcdc retention

Parameters
[in]ptrbase address

◆ pcfg_disable_power_trap()

static void pcfg_disable_power_trap ( PCFG_Type ptr)
inlinestatic

disable power trap

Parameters
[in]ptrbase address

◆ pcfg_disable_wakeup_source()

static void pcfg_disable_wakeup_source ( PCFG_Type ptr,
uint32_t  mask 
)
inlinestatic

disable wakeup source

Parameters
[in]ptrbase address
[in]masksource to be disabled as wakeup source

◆ pcfg_enable_cpu0_debug_stop_notfication()

static void pcfg_enable_cpu0_debug_stop_notfication ( PCFG_Type ptr)
inlinestatic

Enable CPU0 debug stop notification to peripherals.

Parameters
[in]ptr

◆ pcfg_enable_cpu1_debug_stop_notfication()

static void pcfg_enable_cpu1_debug_stop_notfication ( PCFG_Type ptr)
inlinestatic

Enable CPU1 debug stop notification to peripherals.

Parameters
[in]ptr

◆ pcfg_enable_dcdc_retention()

static void pcfg_enable_dcdc_retention ( PCFG_Type ptr)
inlinestatic

enable dcdc retention to retain soc sram data

Parameters
[in]ptrbase address

◆ pcfg_enable_power_trap()

static void pcfg_enable_power_trap ( PCFG_Type ptr)
inlinestatic

enable power trap

Parameters
[in]ptrbase address

◆ pcfg_enable_wakeup_source()

static void pcfg_enable_wakeup_source ( PCFG_Type ptr,
uint32_t  mask 
)
inlinestatic

enable wakeup source

Parameters
[in]ptrbase address
[in]maskwakeup source mask

◆ pcfg_get_wakeup_cause()

static uint32_t pcfg_get_wakeup_cause ( PCFG_Type ptr)
inlinestatic

get wakeup cause

Parameters
[in]ptrbase address
Return values
maskof wake cause

◆ pcfg_irc24m_is_trimmed()

static bool pcfg_irc24m_is_trimmed ( PCFG_Type ptr)
inlinestatic

check if irc24m is trimmed

Parameters
[in]ptrbase address
Return values
trueif it is trimmed

◆ pcfg_irc24m_reload_trim()

static void pcfg_irc24m_reload_trim ( PCFG_Type ptr)
inlinestatic

reload irc24m trim value

Parameters
[in]ptrbase address

◆ pcfg_is_power_trap_triggered()

static bool pcfg_is_power_trap_triggered ( PCFG_Type ptr)
inlinestatic

check if power trap is triggered

Parameters
[in]ptrbase address
Return values
trueif power trap is triggered

◆ pcfg_ldo2p5_is_stable()

static bool pcfg_ldo2p5_is_stable ( PCFG_Type ptr)
inlinestatic

check if LDO 2.5V is stable

Parameters
[in]ptrbase address
Return values
trueif LDO2P5 is stable

◆ pcfg_ldo2p5_turn_off()

static void pcfg_ldo2p5_turn_off ( PCFG_Type ptr)
inlinestatic

turn off LDO2P5

Parameters
[in]ptrbase address

◆ pcfg_ldo2p5_turn_on()

static void pcfg_ldo2p5_turn_on ( PCFG_Type ptr)
inlinestatic

turn on LDO 2.5V

Parameters
[in]ptrbase address

◆ pcfg_set_periph_clock_mode()

static void pcfg_set_periph_clock_mode ( PCFG_Type ptr,
uint32_t  mode 
)
inlinestatic

set clock gate mode in vpmc domain

Parameters
[in]ptrbase address
[in]modeclock gate mode mask

◆ pcfg_update_periph_clock_mode()

static void pcfg_update_periph_clock_mode ( PCFG_Type ptr,
pcfg_pmc_periph_t  periph,
bool  on 
)
inlinestatic

update clock gate mode in vpmc domain

Parameters
[in]ptrbase address
[in]periphperipherals to be updated
[in]ontrue - always on, false - always off