Open dmitrykez opened 1 year ago
No solution for this? This is VERY annoying if you try to fly a quadcopter with an esp32s2 ! Looptime of 2ms and every 2 seconds it makes a 5ms pause.
In the main Arduino loop, above loop() function, in the file cores/esp32/main.cpp we see yieldIfNecessary() function. It works on ESP32-S2 for example as it only has one core. Function adds a 5ms delay every two seconds. Under some specific circumstances, this causes problem with loop() execution time.
Answers checklist.
General issue report
I have an issue with ESP32-S2-WROOM which stalls for 4.28ms every 2 seconds. I tries several modules (same P/N) and all of them behave similar.
To reproduce the problem I used a very simple code which constantly toggles GPIO in a main loop.
void loop() { debug_gpio = !debug_gpio; digitalWrite(MY_GPIO, debug_gpio); }
The chip remains with a default setting as I don't configure anything on boot. Only SPIFFS is being configured, but it doesn't change the behavior.
Pause every 2 seconds:
Pause length is 4.27ms:
Anyone familiar with the phenomena?