From ef8ff691aaf1aa8afc9f8e897a046987a5b8319f Mon Sep 17 00:00:00 2001 From: Lou Tianhao Date: Tue, 9 Jul 2024 20:54:04 +0800 Subject: [PATCH] change(esp_hw_support): update pmu sleep analog parameter change(pm): update pmu analog param for pu xtal or pu rc_fast during sleep change(pm): update pmu analog param for reducing the impact of temperature on chip voltage --- components/esp_hw_support/port/esp32c5/pmu_sleep.c | 8 +++++--- .../port/esp32c5/private_include/pmu_param.h | 12 +++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/components/esp_hw_support/port/esp32c5/pmu_sleep.c b/components/esp_hw_support/port/esp32c5/pmu_sleep.c index 7a0586fe13..cddc01697a 100644 --- a/components/esp_hw_support/port/esp32c5/pmu_sleep.c +++ b/components/esp_hw_support/port/esp32c5/pmu_sleep.c @@ -174,14 +174,16 @@ const pmu_sleep_config_t* pmu_sleep_config_default( pmu_sleep_analog_config_t analog_default = PMU_SLEEP_ANALOG_LSLP_CONFIG_DEFAULT(pd_flags); - if (!(pd_flags & PMU_SLEEP_PD_XTAL)){ + if (!(pd_flags & PMU_SLEEP_PD_XTAL) || !(pd_flags & PMU_SLEEP_PD_RC_FAST)){ analog_default.hp_sys.analog.pd_cur = PMU_PD_CUR_SLEEP_ON; analog_default.hp_sys.analog.bias_sleep = PMU_BIASSLP_SLEEP_ON; - analog_default.hp_sys.analog.dbias = HP_CALI_DBIAS_DEFAULT; + analog_default.hp_sys.analog.dbias = HP_CALI_DBIAS_SLP_1V1; + analog_default.hp_sys.analog.dbg_atten = 0; analog_default.lp_sys[LP(SLEEP)].analog.pd_cur = PMU_PD_CUR_SLEEP_ON; analog_default.lp_sys[LP(SLEEP)].analog.bias_sleep = PMU_BIASSLP_SLEEP_ON; - analog_default.lp_sys[LP(SLEEP)].analog.dbias = LP_CALI_DBIAS_DEFAULT; + analog_default.lp_sys[LP(SLEEP)].analog.dbias = LP_CALI_DBIAS_SLP_1V1; + analog_default.lp_sys[LP(SLEEP)].analog.dbg_atten = 0; } config->analog = analog_default; diff --git a/components/esp_hw_support/port/esp32c5/private_include/pmu_param.h b/components/esp_hw_support/port/esp32c5/private_include/pmu_param.h index 7d0a1a5b77..ff4ae179de 100644 --- a/components/esp_hw_support/port/esp32c5/private_include/pmu_param.h +++ b/components/esp_hw_support/port/esp32c5/private_include/pmu_param.h @@ -20,6 +20,8 @@ extern "C" { #define HP_CALI_DBIAS_DEFAULT 28 #define LP_CALI_DBIAS_DEFAULT 28 +#define HP_CALI_DBIAS_SLP_1V1 22 +#define LP_CALI_DBIAS_SLP_1V1 22 // FOR XTAL FORCE PU IN SLEEP #define PMU_PD_CUR_SLEEP_ON 0 @@ -37,17 +39,17 @@ extern "C" { #define PMU_LP_DRVB_LIGHTSLEEP 0 #define PMU_HP_XPD_LIGHTSLEEP 1 -#define PMU_DBG_ATTEN_LIGHTSLEEP_DEFAULT 0 -#define PMU_HP_DBIAS_LIGHTSLEEP_0V6 1 -#define PMU_LP_DBIAS_LIGHTSLEEP_0V7 12 +#define PMU_DBG_ATTEN_LIGHTSLEEP_DEFAULT 1 +#define PMU_HP_DBIAS_LIGHTSLEEP_0V6 0 +#define PMU_LP_DBIAS_LIGHTSLEEP_0V7 15 // FOR DEEPSLEEP #define PMU_DBG_HP_DEEPSLEEP 0 #define PMU_HP_XPD_DEEPSLEEP 0 #define PMU_LP_DRVB_DEEPSLEEP 0 -#define PMU_DBG_ATTEN_DEEPSLEEP_DEFAULT 12 -#define PMU_LP_DBIAS_DEEPSLEEP_0V7 23 +#define PMU_DBG_ATTEN_DEEPSLEEP_DEFAULT 9 +#define PMU_LP_DBIAS_DEEPSLEEP_0V7 15 uint32_t get_act_hp_dbias(void); uint32_t get_act_lp_dbias(void);