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 @@ -412,10 +412,20 @@ void rtc_clk_cpu_freq_set_xtal_for_sleep(void)
412412void rtc_clk_cpu_freq_to_pll_and_pll_lock_release (int cpu_freq_mhz )
413413{
414414 // IDF-11064
415- if (cpu_freq_mhz == 240 || ( cpu_freq_mhz == 80 && ! ESP_CHIP_REV_ABOVE ( efuse_hal_chip_revision (), 1 )) ) {
415+ if (cpu_freq_mhz == 240 ) {
416416 rtc_clk_cpu_freq_to_pll_240_mhz (cpu_freq_mhz );
417- } else { // cpu_freq_mhz is 160 or 80 (fixed for chip rev. >= ECO1)
417+ } else if ( cpu_freq_mhz == 160 ) {
418418 rtc_clk_cpu_freq_to_pll_160_mhz (cpu_freq_mhz );
419+ } else {// cpu_freq_mhz is 80
420+ if (!ESP_CHIP_REV_ABOVE (efuse_hal_chip_revision (), 101 )) {// (use 240mhz pll if max cpu freq is 240MHz)
421+ #if CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
422+ rtc_clk_cpu_freq_to_pll_240_mhz (cpu_freq_mhz );
423+ #else
424+ rtc_clk_cpu_freq_to_pll_160_mhz (cpu_freq_mhz );
425+ #endif
426+ } else {// (fixed for chip rev. >= ECO3)
427+ rtc_clk_cpu_freq_to_pll_160_mhz (cpu_freq_mhz );
428+ }
419429 }
420430 clk_ll_cpu_clk_src_lock_release ();
421431}
You can’t perform that action at this time.
0 commit comments