Page 1 of 1

CPU frequency under 80Mhz

Posted: Wed Aug 03, 2022 9:23 am
by AyubowanPro
Hello,

I would like to set the CPU frequency of my ESP32 custom board under 80Mhz for lowering power consumption. I'm using the PlatformIO IDE with Arduino framework.

I tried the setCpuFrequencyMhz() function but getCpuFrequencyMhz() always returns 240Mhz whatever I set with setCpuFrequencyMhz().
But by using board_build.f_cpu = 80000000L, it is working. However, the board crashes with board_build.f_cpu = 40000000L (40Mhz). Is there a way to lower the frequency under 80Mhz ?

Have a nice day

Re: CPU frequency under 80Mhz

Posted: Thu Aug 04, 2022 11:11 pm
by chegewara
AyubowanPro wrote:
Wed Aug 03, 2022 9:23 am
But by using board_build.f_cpu = 80000000L, it is working. However, the board crashes with board_build.f_cpu = 40000000L (40Mhz). Is there a way to lower the frequency under 80Mhz ?

Have a nice day
Is your code using wifi or bt/ble? Because in this case 80MHz is minimum you can go.