ESP32 Crashing after 10 - 20 mins of running
Posted: Fri Dec 10, 2021 4:15 am
My program crash after running 10 - 20 mins.
I have LCD touchscreen, 2 sensors, ESP-NOW and serial input/output.
I am running TaskScheduler with 2-3 Tasks and ESP-NOW callbacks for data sent and receive.
ESP-NOW is used to send data from many slaves to the Master.
It is the Master that crashed.
Here is the error:
I have sent the last 5 days trying to solve this with no avail.
I tried removing all my PSRAM variables back to normal RAM to increase speed for painting screen, putting the ESP-NOW sending on a separate core, etc.
Here is my program in general.
1.2 -3 tasks doing screen painting and sensor capture.
2.1 task sending data via ESP-NOW
3. ESP-NOW callbacks function when data received
4. Monitor serial input because I need to generate serial output when connected to a computer
5. Handle screen touches
Here is my loop:
Any pointers?
I have LCD touchscreen, 2 sensors, ESP-NOW and serial input/output.
I am running TaskScheduler with 2-3 Tasks and ESP-NOW callbacks for data sent and receive.
ESP-NOW is used to send data from many slaves to the Master.
It is the Master that crashed.
Here is the error:
- Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (677151)
- task_wdt: - IDLE0 (CPU 0) E (677151)
- task_wdt: Tasks currently running: E (677151)
- task_wdt: CPU 0: wifi E (677151)
- task_wdt: CPU 1: loopTask E (677151)
- task_wdt: Aborting. abort() was called at PC 0x40195cd4 on core 0
I tried removing all my PSRAM variables back to normal RAM to increase speed for painting screen, putting the ESP-NOW sending on a separate core, etc.
Here is my program in general.
1.2 -3 tasks doing screen painting and sensor capture.
2.1 task sending data via ESP-NOW
3. ESP-NOW callbacks function when data received
4. Monitor serial input because I need to generate serial output when connected to a computer
5. Handle screen touches
Here is my loop:
- void loop() {
- vTaskDelay(100 / portTICK_PERIOD_MS);
- meterScreenHandleButtons();
- userScheduler.execute();
- // Serial Communications
- if(Serial.available() && (selectedOperation != SLAVE)) {
- processSerialCommand(Serial.readStringUntil('\r\n'));
- }
- }