cpu_start: fix warnings with CONFIG_PM_DFS_INIT_AUTO option
Closes https://github.com/espressif/esp-idf/issues/3297
This commit is contained in:
parent
acc882f4dd
commit
1fcef31195
1 changed files with 3 additions and 4 deletions
|
@ -372,11 +372,10 @@ void start_cpu0_default(void)
|
||||||
#ifdef CONFIG_PM_ENABLE
|
#ifdef CONFIG_PM_ENABLE
|
||||||
esp_pm_impl_init();
|
esp_pm_impl_init();
|
||||||
#ifdef CONFIG_PM_DFS_INIT_AUTO
|
#ifdef CONFIG_PM_DFS_INIT_AUTO
|
||||||
rtc_cpu_freq_t max_freq;
|
int xtal_freq = (int) rtc_clk_xtal_freq_get();
|
||||||
rtc_clk_cpu_freq_from_mhz(CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ, &max_freq);
|
|
||||||
esp_pm_config_esp32_t cfg = {
|
esp_pm_config_esp32_t cfg = {
|
||||||
.max_cpu_freq = max_freq,
|
.max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ,
|
||||||
.min_cpu_freq = RTC_CPU_FREQ_XTAL
|
.min_freq_mhz = xtal_freq,
|
||||||
};
|
};
|
||||||
esp_pm_configure(&cfg);
|
esp_pm_configure(&cfg);
|
||||||
#endif //CONFIG_PM_DFS_INIT_AUTO
|
#endif //CONFIG_PM_DFS_INIT_AUTO
|
||||||
|
|
Loading…
Reference in a new issue