File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
components/esp_hw_support/port/esp32c5 Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -427,10 +427,20 @@ void rtc_clk_cpu_freq_set_xtal_for_sleep(void)
427427void rtc_clk_cpu_freq_to_pll_and_pll_lock_release (int cpu_freq_mhz )
428428{
429429 // IDF-11064
430- if (cpu_freq_mhz == 240 || ( cpu_freq_mhz == 80 && ! ESP_CHIP_REV_ABOVE ( efuse_hal_chip_revision (), 1 )) ) {
430+ if (cpu_freq_mhz == 240 ) {
431431 rtc_clk_cpu_freq_to_pll_240_mhz (cpu_freq_mhz );
432- } else { // cpu_freq_mhz is 160 or 80 (fixed for chip rev. >= ECO1)
432+ } else if ( cpu_freq_mhz == 160 ) {
433433 rtc_clk_cpu_freq_to_pll_160_mhz (cpu_freq_mhz );
434+ } else {// cpu_freq_mhz is 80
435+ if (!ESP_CHIP_REV_ABOVE (efuse_hal_chip_revision (), 101 )) {// (use 240mhz pll if max cpu freq is 240MHz)
436+ #if CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
437+ rtc_clk_cpu_freq_to_pll_240_mhz (cpu_freq_mhz );
438+ #else
439+ rtc_clk_cpu_freq_to_pll_160_mhz (cpu_freq_mhz );
440+ #endif
441+ } else {// (fixed for chip rev. >= ECO3)
442+ rtc_clk_cpu_freq_to_pll_160_mhz (cpu_freq_mhz );
443+ }
434444 }
435445 clk_ll_cpu_clk_src_lock_release ();
436446}
You can’t perform that action at this time.
0 commit comments