Is PLL 480 MHz or 320 MHz fixed per chip?
Posted: Mon Nov 24, 2025 6:23 am
I'm doing some bare metal dev work on the ESP32 and noticed something when playing around with the CPU frequency.
APB is supposed to be 80 MHz when the CPU clock source is PLL. Assuming APB_CLK is obtained from the PLL_CLK, the divider must be 4 if the PLL is 320 MHz and 6 if the PLL is 480 MHz. How ever, when i switch the PLL to 480 MHz (needed to run the CPU at 240 MHz), the APB_CLK drops to 53 MHz. This can be explained by the PLL clock staying at 320 MHz but the divider becoming 6.
So is the PLL clock speed fixed per chip? i.e it runs either at 480 or 320? Did I do the switching incorrectly? I set RTC_CNTL_SOC_CLK_SEL and CPU_CPUPERIOD_SEL as per the TRM, was there something else I should've set?
APB is supposed to be 80 MHz when the CPU clock source is PLL. Assuming APB_CLK is obtained from the PLL_CLK, the divider must be 4 if the PLL is 320 MHz and 6 if the PLL is 480 MHz. How ever, when i switch the PLL to 480 MHz (needed to run the CPU at 240 MHz), the APB_CLK drops to 53 MHz. This can be explained by the PLL clock staying at 320 MHz but the divider becoming 6.
So is the PLL clock speed fixed per chip? i.e it runs either at 480 or 320? Did I do the switching incorrectly? I set RTC_CNTL_SOC_CLK_SEL and CPU_CPUPERIOD_SEL as per the TRM, was there something else I should've set?