Skip to content

Commit 2ab144d

Browse files
committed
fix(esp_hw_support): set pau entry backup configuration with link update
1 parent 1854036 commit 2ab144d

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

components/esp_hw_support/port/esp32p4/pmu_sleep.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -247,19 +247,6 @@ void pmu_sleep_init(const pmu_sleep_config_t *config, bool dslp)
247247
}
248248
pmu_sleep_analog_init(PMU_instance(), &config->analog, dslp);
249249
pmu_sleep_param_init(PMU_instance(), &config->param, dslp);
250-
251-
// When light sleep (PD_TOP), the PAU will power down. so need use LP_SYS_BACKUP_DMA_CFG2_REG to store recover link address.
252-
if (!dslp && PMU.hp_sys[PMU_MODE_HP_SLEEP].dig_power.top_pd_en) {
253-
if (PMU.hp_sys[PMU_MODE_HP_SLEEP].backup.hp_active2sleep_backup_en ||
254-
PMU.hp_sys[PMU_MODE_HP_ACTIVE].backup.hp_sleep2active_backup_en) {
255-
uint32_t link_sel = PMU.hp_sys[PMU_MODE_HP_SLEEP].backup.hp_active2sleep_backup_mode & 0x3;
256-
uint32_t link_addr = REG_READ(PAU_REGDMA_LINK_0_ADDR_REG + link_sel * 4);
257-
lp_sys_ll_set_pau_link_addr(link_addr);
258-
pmu_sleep_enable_regdma_backup();
259-
}
260-
} else {
261-
pmu_sleep_disable_regdma_backup();
262-
}
263250
}
264251

265252
void pmu_sleep_increase_ldo_volt(void) {

components/hal/esp32p4/pau_hal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ void pau_hal_set_regdma_entry_link_addr(pau_hal_context_t *hal, pau_regdma_link_
2020
pau_ll_set_regdma_link2_addr(hal->dev, (*link_addr)[2]);
2121
/* The link 3 of REGDMA is reserved, PMU state switching will not use
2222
* REGDMA link 3 */
23+
24+
// When light sleep (PD_TOP), the PAU will power down. so need use LP_SYS_BACKUP_DMA_CFG2_REG
25+
// to store recover link address. We always use link0 as the default retention entry.
26+
lp_sys_ll_set_pau_link_addr((uint32_t)(*link_addr)[0]);
2327
}
2428

2529
void IRAM_ATTR pau_hal_start_regdma_modem_link(pau_hal_context_t *hal, bool backup_or_restore)

0 commit comments

Comments
 (0)