mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Merge branch 'feat/esp_idf_lp_uart_wakeup_v6.0' into 'release/v6.0'
feat(esp_hw_support): support lp uart wakeup during sleep (v6.0) See merge request espressif/esp-idf!43151
This commit is contained in:
@@ -285,6 +285,12 @@ const pmu_sleep_config_t* pmu_sleep_config_default(
|
||||
config->analog.hp_sys.analog.dbias = get_act_hp_dbias();
|
||||
}
|
||||
|
||||
if (sleep_flags & RTC_SLEEP_LP_PERIPH_USE_RC_FAST) {
|
||||
config->analog.hp_sys.analog.dbias = get_act_hp_dbias();
|
||||
config->analog.lp_sys[LP(SLEEP)].analog.dbg_atten = 0;
|
||||
config->analog.lp_sys[LP(SLEEP)].analog.dbias = get_act_lp_dbias();
|
||||
}
|
||||
|
||||
config->power = power_default;
|
||||
pmu_sleep_param_config_t param_default = PMU_SLEEP_PARAM_CONFIG_DEFAULT(sleep_flags);
|
||||
config->param = *pmu_sleep_param_config_default(¶m_default, &power_default, sleep_flags, adjustment, slowclk_src, slowclk_period, fastclk_period);
|
||||
|
||||
@@ -241,6 +241,7 @@ const pmu_sleep_config_t* pmu_sleep_config_default(
|
||||
pmu_sleep_analog_config_t analog_default = PMU_SLEEP_ANALOG_DSLP_CONFIG_DEFAULT(sleep_flags);
|
||||
analog_default.lp_sys[LP(SLEEP)].analog.dbg_atten = get_dslp_dbg();
|
||||
analog_default.lp_sys[LP(SLEEP)].analog.dbias = get_dslp_lp_dbias();
|
||||
|
||||
config->analog = analog_default;
|
||||
} else {
|
||||
pmu_sleep_digital_config_t digital_default = PMU_SLEEP_DIGITAL_LSLP_CONFIG_DEFAULT(sleep_flags, clk_flags);
|
||||
@@ -279,6 +280,12 @@ const pmu_sleep_config_t* pmu_sleep_config_default(
|
||||
config->analog.hp_sys.analog.dbias = get_act_hp_dbias();
|
||||
}
|
||||
|
||||
if (sleep_flags & RTC_SLEEP_LP_PERIPH_USE_RC_FAST) {
|
||||
config->analog.hp_sys.analog.dbias = get_act_hp_dbias();
|
||||
config->analog.lp_sys[LP(SLEEP)].analog.dbg_atten = PMU_DBG_ATTEN_LIGHTSLEEP_NODROP;
|
||||
config->analog.lp_sys[LP(SLEEP)].analog.dbias = get_act_lp_dbias();
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "hal/pmu_hal.h"
|
||||
#include "hal/psram_ctrlr_ll.h"
|
||||
#include "hal/lp_sys_ll.h"
|
||||
#include "hal/clk_gate_ll.h"
|
||||
#include "esp_private/esp_pmu.h"
|
||||
#include "pmu_param.h"
|
||||
#include "esp_rom_sys.h"
|
||||
@@ -224,8 +223,10 @@ const pmu_sleep_config_t* pmu_sleep_config_default(
|
||||
config->analog.hp_sys.analog.dbias = HP_CALI_ACTIVE_DBIAS_DEFAULT;
|
||||
}
|
||||
|
||||
if (sleep_flags & RTC_SLEEP_LP_PERIPH_USE_XTAL) {
|
||||
_clk_gate_ll_xtal_to_lp_periph_en(true);
|
||||
if (sleep_flags & RTC_SLEEP_LP_PERIPH_USE_RC_FAST) {
|
||||
config->analog.hp_sys.analog.dbias = get_act_hp_dbias();
|
||||
config->analog.lp_sys[LP(SLEEP)].analog.dbg_atten = 0;
|
||||
config->analog.lp_sys[LP(SLEEP)].analog.dbias = get_act_lp_dbias();
|
||||
}
|
||||
|
||||
config->power = power_default;
|
||||
|
||||
Reference in New Issue
Block a user