mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-22 17:02:25 +00:00
fix(esp_pm): update CPU frequency immediately after updating pm_config
Closes https://github.com/espressif/esp-idf/issues/13492
This commit is contained in:
@@ -468,6 +468,7 @@ esp_err_t esp_pm_configure(const void* vconfig)
|
||||
s_config_changed = true;
|
||||
portEXIT_CRITICAL(&s_switch_lock);
|
||||
|
||||
do_switch(PM_MODE_CPU_MAX);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -617,7 +618,7 @@ static void IRAM_ATTR do_switch(pm_mode_t new_mode)
|
||||
#endif
|
||||
portEXIT_CRITICAL_ISR(&s_switch_lock);
|
||||
} while (true);
|
||||
if (new_mode == s_mode) {
|
||||
if ((new_mode == s_mode) && !s_config_changed) {
|
||||
portEXIT_CRITICAL_ISR(&s_switch_lock);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user