I noticed that using “board_build.f_cpu = 240000000L” in the platform.ini file does not affect the speed.
Using an ESP32 Dev module, I have always included this in my platform.ini file to make it run as fast as possible:
; set frequency to 240MHz
board_build.f_cpu = 240000000L
I have often wondered if that was really doing anything, so today I set out to prove that.
I am running the following code.
I do see it (see below). I have tried re-making it with:
“board_build.f_cpu = 160000000L”
“board_build.f_cpu = 240000000L”
using this for both attempts
pio run -t clean
pio run -v
When I clean and build again i do see that "-DF_CPU= " what I set in the platform.ini file. However uploading it has no affect on the speed. I should also note that the speed on the GPIO pin shows its always running at 240MHZ regardless what I set “board_build.f_cpu =” to, and what “-DF_CPU=” stated in the build process.
I then jumped over to IDF using mingw32.exe and tried this example,