PlatformIO Community

Esp32 is slow running speed in PIO

I use ESP-WROOM-32 is normal work in arduino.But same code is slow running speed in PIO.
For example,upload FPS.ino in U8g2 library.
In arduino,value > 5
In PIO,value all is 2.1

I tried to set CPU frequency,but it is useless

Please help me,thanks.

  • What version of the Arduino-ESP32 core are you using in the Arduino IDE, what in PlatformIO?
  • What are the exact versions of the used libraries?
  • What are the Arduino IDE → Tools settings?
  • What’s the platformio.ini?
1 Like

1.Arduino-esp32 version is 2.0.0 .But i do not know esp32 version in PIO,I selected denky32.
2.All libraries is same
3. image
4.

[env:esp32doit-devkit-v1]
platform = espressif32
board = denky32
framework = arduino
board_build.f_cpu = 240000000L
board_build.f_flash = 80000000L
upload_speed = 921600
board_build.flash_mode = dio
lib_deps = 
	adafruit/RTClib@^2.1.1
	olikraus/U8g2@2.26.14

thank your reply

Why not board = esp32doit-devkit-v1?

Why not test on the latest 2.0.5? That’s what PIO gives you when you use the latest version.

If you want to make PIO use core 2.0.0, you have to use an older platform version. Per Releases · platformio/platform-espressif32 · GitHub, that is

platform = espressif32@4.0.0
1 Like

I used esp32doit-devkit-v1 But it also works slowly.
Downloaded Version 2.0.0 before, but I haven’t updated it.I will try the versions of what you said.
thanks

I solved it!
The problem is solved after installing espressif 4.0.0 .
I want to know it is why?
Maybe i should installed Arduino-esp32 2.0.5 ,and I will know why

Yes. If it is also slow in the Arduino IDE with core 2.0.5, please report a regression to Issues · espressif/arduino-esp32 · GitHub.