You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a ESP8266 I have an app, that is running an FSM by a Timer each 100uSec. (running fine with: Wifi, webserver, i2c, spi ...)
On an ESP32 a single bit toggle by a Timer can work at the same rate in Basic_Blink, but in Basic_Wifi sample, a rate faster than 15mS will hang the system.
Here is an extract of the test code:
int i;
IRAM_ATTR void systick()
{
if(i++>9){
digitalWrite(22,!digitalRead(22)); // this is an LED on my ESP32 Board TTGO V1.3
i=0;
}
}
in void init()
pinMode(22,OUTPUT);
pulse_timer.initializeMs<15>(systick).start();
ESP8266 has only one core and is performing better with Timer and WiFi
Esp32 has two cores, but Timer seems to interfere with WiFi at a rate too fast.
Is it something that can be improved in ESP32 ? (by not using the same core that WiFi uses ? or else)
The text was updated successfully, but these errors were encountered:
Fast timers are very inefficient on the esp32 due to the interrupt and software servicing overhead. Perhaps look for a way to use the hardware directly, e.g. LEDC or other modules.
Sming builds with CONFIG_FREERTOS_UNICORE=y by default. See #2916 et. al.
NB. Are you using HardwareTimer? This has a lower software overhead as the callback is invoked in interrupt context. Software timers use the task queue which slows things down.
On a ESP8266 I have an app, that is running an FSM by a Timer each 100uSec. (running fine with: Wifi, webserver, i2c, spi ...)
On an ESP32 a single bit toggle by a Timer can work at the same rate in Basic_Blink, but in Basic_Wifi sample, a rate faster than 15mS will hang the system.
Here is an extract of the test code:
in void init()
pinMode(22,OUTPUT);
pulse_timer.initializeMs<15>(systick).start();
ESP8266 has only one core and is performing better with Timer and WiFi
Esp32 has two cores, but Timer seems to interfere with WiFi at a rate too fast.
Is it something that can be improved in ESP32 ? (by not using the same core that WiFi uses ? or else)
The text was updated successfully, but these errors were encountered: