mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-16 06:54:22 +00:00
fix(esp_pm): fix psram access faild after pd_cpu wakeup
This commit is contained in:
@@ -439,8 +439,11 @@ esp_err_t esp_pm_configure(const void* vconfig)
|
||||
min_freq_mhz,
|
||||
config->light_sleep_enable ? "ENABLED" : "DISABLED");
|
||||
|
||||
portENTER_CRITICAL(&s_switch_lock);
|
||||
// CPU & Modem power down initialization, which must be initialized before s_light_sleep_en set true,
|
||||
// to avoid entering idle and sleep in this function.
|
||||
esp_pm_sleep_configure(config);
|
||||
|
||||
portENTER_CRITICAL(&s_switch_lock);
|
||||
bool res __attribute__((unused));
|
||||
res = rtc_clk_cpu_freq_mhz_to_config(max_freq_mhz, &s_cpu_freq_by_mode[PM_MODE_CPU_MAX]);
|
||||
assert(res);
|
||||
@@ -453,8 +456,6 @@ esp_err_t esp_pm_configure(const void* vconfig)
|
||||
s_config_changed = true;
|
||||
portEXIT_CRITICAL(&s_switch_lock);
|
||||
|
||||
esp_pm_sleep_configure(config);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user