From 2ceddff922dab38dd25a88972cd5a89638f1cffa Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Tue, 16 Apr 2024 18:09:55 +0800 Subject: [PATCH] fix(esp_hw_support): fix the problem of unstable PSRAM power supply during sleep --- components/esp_hw_support/port/esp32p4/pmu_sleep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/esp_hw_support/port/esp32p4/pmu_sleep.c b/components/esp_hw_support/port/esp32p4/pmu_sleep.c index aabdc45bd0..919197fb48 100644 --- a/components/esp_hw_support/port/esp32p4/pmu_sleep.c +++ b/components/esp_hw_support/port/esp32p4/pmu_sleep.c @@ -159,6 +159,10 @@ const pmu_sleep_config_t* pmu_sleep_config_default( config->digital = digital_default; pmu_sleep_analog_config_t analog_default = PMU_SLEEP_ANALOG_LSLP_CONFIG_DEFAULT(pd_flags); +#if CONFIG_SPIRAM + analog_default.hp_sys.analog.pd_cur = 1; + analog_default.lp_sys[PMU_MODE_LP_SLEEP].analog.pd_cur = 1; +#endif config->analog = analog_default; } return config;