mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
Merge branch 'feat/set_cpu_freq_after_pm_config_changed' into 'master'
fix(esp_pm): update CPU frequency immediately after updating pm_config Closes IDFGH-12481 See merge request espressif/esp-idf!29963
This commit is contained in:
@@ -470,6 +470,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;
|
||||
}
|
||||
|
||||
@@ -619,7 +620,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