From 5bcfa44e029352d5aac628f519151b41dc436a7b Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Fri, 17 Oct 2025 20:20:40 +0800 Subject: [PATCH] change(esp_hw_support): set HP/LP mem in retention mode in sleep --- components/esp_hw_support/port/esp32p4/pmu_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/esp_hw_support/port/esp32p4/pmu_init.c b/components/esp_hw_support/port/esp32p4/pmu_init.c index eb12756cf4e..fe87b90cea9 100644 --- a/components/esp_hw_support/port/esp32p4/pmu_init.c +++ b/components/esp_hw_support/port/esp32p4/pmu_init.c @@ -17,6 +17,7 @@ #include "pmu_param.h" #include "esp_private/esp_pmu.h" #include "soc/regi2c_dig_reg.h" +#include "soc/lp_system_reg.h" #include "regi2c_ctrl.h" #include "esp_rom_sys.h" #include "soc/rtc.h" @@ -174,6 +175,7 @@ static void pmu_hp_system_init_default(pmu_context_t *ctx) pmu_hp_system_param_default(mode, ¶m); pmu_hp_system_init(ctx, mode, ¶m); } + REG_SET_FIELD(LP_SYSTEM_REG_HP_MEM_AUX_CTRL_REG, LP_SYSTEM_REG_HP_MEM_AUX_CTRL, 0x2074); } static inline void pmu_lp_system_param_default(pmu_lp_mode_t mode, pmu_lp_system_param_t *param) @@ -190,6 +192,7 @@ static void pmu_lp_system_init_default(pmu_context_t *ctx) pmu_lp_system_param_default(mode, ¶m); pmu_lp_system_init(ctx, mode, ¶m); } + REG_SET_FIELD(LP_SYSTEM_REG_LP_MEM_AUX_CTRL_REG, LP_SYSTEM_REG_LP_MEM_AUX_CTRL, 0x2074); } void pmu_init(void)