4 ms·
They've done a good job of hiding the RTOS from you and making most sketches run fine without porting, but you're still running as a task under the RTOS, yieldi
by meatmanek 3y ago
They've done a good job of hiding the RTOS from you and making most sketches run fine without porting, but you're still running as a task under the RTOS, yielding between loop() calls[1]. This leads to mysterious timing issues if you aren't aware of it[2]
It doesn't appear that the Arduino core for the Renesas chip is using the RTOS, at least by default -- its main loop is literally doing while (1) { loop(); }, similar to how the AVR core works. [3, 4]
1. https://github.com/espressif/arduino-esp32/blob/72c41d09538663ebef80d29eb986cd5bc3395c2d/cores/esp32/main.cpp#L45
2. https://www.reddit.com/r/esp32/comments/t9aqr6/what_on_earth_is_my_esp32_doing_between_loops/
3. https://github.com/arduino/ArduinoCore-renesas/blob/149f78b6490ccbafeb420f68919c381a5bdb6e21/cores/arduino/main.cpp#L115
4. https://github.com/arduino/ArduinoCore-avr/blob/eabd762a1edcf076877b7bec28b7f99099141473/cores/arduino/main.cpp#L46