Board_build.f_cpu has no affect

Hi,
I am trying to reduce the power consumption of an IoT-project based on a Wemos D1 mini, therefore I heard lowering the CPU frequency would help.
So I tried adding board_build.f_cpu but it seems like there is no affect on the cpu frequency.

Searching the internet I only found this topic with no solution.

by the way I am open to other suggestions to reduce the power consumption other than sleep and lower cpu frequency.

That topic is for the ESP32, so probably not very relevant to an ESP8266 Wemos D1 Mini.

What did you specify when you were setting board_build.f_cpu? I was using the following as part of some testing of an issue in the ESP8266Arduino core a few weeks ago, and it was working then…

i.e. to switch between 80 and 160Mhz…

[env:d1_mini_80Mhz]
board = d1_mini
board_build.f_cpu = 80000000L

[env:d1_mini_160Mhz]
board = d1_mini
board_build.f_cpu = 160000000L

With the following in the code to check if the speed was correctly set…

Serial.printf("CpuFreqMHz: %u MHz\n", ESP.getCpuFreqMHz());
1 Like