Skip to content

Commit

Permalink
fix(clk_src): Fix error as APLL is not yet supported for P4
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed Dec 16, 2024
1 parent 1ef1e7d commit c688f30
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions cores/esp32/esp32-hal-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,18 +259,10 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz) {
if (apb_change_callbacks) {
triggerApbChangeCallback(APB_AFTER_CHANGE, capb, apb);
}
// clang-format off
#ifdef SOC_CLK_APLL_SUPPORTED
#if defined(SOC_CLK_APLL_SUPPORTED) && !defined(CONFIG_IDF_TARGET_ESP32P4) // APLL not yet supported in ESP32-P4
log_d(
"%s: %u / %u = %u Mhz, APB: %u Hz",
(conf.source == SOC_CPU_CLK_SRC_PLL) ? "PLL"
: ((conf.source == SOC_CPU_CLK_SRC_APLL) ? "APLL"
: ((conf.source == SOC_CPU_CLK_SRC_XTAL) ? "XTAL"
#ifdef CONFIG_IDF_TARGET_ESP32P4
: "17.5M")),
#else
: "8M")),
#endif
(conf.source == SOC_CPU_CLK_SRC_PLL) ? "PLL" : ((conf.source == SOC_CPU_CLK_SRC_APLL) ? "APLL" : ((conf.source == SOC_CPU_CLK_SRC_XTAL) ? "XTAL" : "8M")),
conf.source_freq_mhz, conf.div, conf.freq_mhz, apb
);
#else
Expand All @@ -279,7 +271,6 @@ bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz) {
conf.source_freq_mhz, conf.div, conf.freq_mhz, apb
);
#endif
// clang-format on
return true;
}

Expand Down

0 comments on commit c688f30

Please sign in to comment.