Smart Thermostat is now a legacy project › Forums › English support forum › rtc_clk_cpu_freq issue › Reply To: rtc_clk_cpu_freq issue
05/11/2023 at 10:29
#1721
Participant
Now I pasted another code for CPU speed (and it works). I hope the admin won’t be offended.
[code]
#include “esp32-hal-cpu.h”
void setup(void)
{
Serial.begin(115200);
setCpuFrequencyMhz(80); //Set CPU clock from 80MHz to 240MHz for example
Serial.println();
Serial.print(“CPU Frequency is: “);
Serial.print(getCpuFrequencyMhz()); //Get CPU clock
Serial.print(” Mhz”);
Serial.println();
}
[/code]
Please can you look into why the code in the previous post is not working.
Thank you