fabfarm/E-SPlash

whachdog crach? reset?

Closed this issue · 6 comments

lpgn commented

Apparently if things hang for to long watchdog resets board. Was facing this from time to time.

Possible problems:

  • internet not connected;
  • to much delays;
  • to much stuff going on in loop;
  • wi-fi re-connection routine added to loop might be causing it.

According to this Stack Overflow answer: https://stackoverflow.com/questions/51750377/how-to-disable-interrupt-watchdog-in-esp32-or-increase-isr-time-limit

"You should always structure your code so that you do the least work you can in loop() and let it return. When it returns the software that supports your ESP32 application gets to do important housekeeping tasks, and reset the watchdog timer."

lpgn commented

Connecting to WiFi..
now Manual Mode
E (56495) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (56495) task_wdt: - async_tcp (CPU 0/1)
E (56495) task_wdt: Tasks currently running:
E (56495) task_wdt: CPU 0: IDLE0
E (56495) task_wdt: CPU 1: IDLE1
E (56495) task_wdt: Aborting.
abort() was called at PC 0x400de5cb on core 0

Backtrace: 0x4008c434:0x3ffbe170 0x4008c665:0x3ffbe190 0x400de5cb:0x3ffbe1b0 0x40084771:0x3ffbe1d0 0x4016f773:0x3ffbc970 0x400df982:0x3ffbc990 0x4008a361:0x3ffbc9b0 0x40088b7d:0x3ffbc9d0

Rebooting...
\UBV␗|��␞�*@�p␃␜�read file - BEGIN
{"data":{"currentTime":"Saturday, June 27 2020 11:42:59","temperature":"Failed to read temperator from sensor","humidity":"Failed to read humidity from sensor","isScheduleMode":0,"ssid":"rato","pass":"imakestuff","isScheduled":0},"relays":[{"name":"Fruit Tree","pin":27,"isRunning":1,"isEnabled":1,"times":[{"startTime":"11:01","duration":40,"hour":11,"min":1}]},{"name":"Vegie Garden","pin":26,"isRunning":1,"isEnabled":1,"status":1,"times":[{"startTime":"11:02","duration":49,"hour":11,"min":2}]},{"name":"Cypress Hill","pin":25,"isRunning":1,"isEnabled":0,"status":1,"times":[{"startTime":"03:03","duration":60,"hour":3,"min":3},{"startTime":"03:03","duration":60,"hour":3,"min":3}]}]}
read file - COMPLETE
json deserialize test - BEGIN
Connecting to WiFi..

lpgn commented

I were able to reproduce the problem with good repeatability here are the steps:

  1. burn firmware;
  2. burn spiffs image;
  3. parse initial jason with /updateData;
  4. esp32 login to WiFi and all works well so far;
  5. disconnect power of board (board loses time);
  6. connect to the board thru SoftAP and access thru softAP IP 192.168.4.1;
  7. page starts loading stops half way, watchdog intervenes and reboot board with message above;
  8. enable the wifi, board connects to wifi (gets internet time) and network IP;
  9. page continues loading and problem disappears.
  • Probable solutions:
    I will try to get time from battery powered rtc clock;

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371

I am getting this error in my esp32 devkit v1
How to solve it?

lpgn commented

@Kashyapkoshti can you give more details are you trying to implement this project in to a esp32?

@lpgn i am using DOIT devkit v1 Esp32 for making remote controlled car with wifi. for some days it worked fine but after that i was getting this error every time i power it . i removed esp32 from circuit board but the error is still showing. On esp forum someone suggested me to reflash esp32 but i don't know how to do it.

lpgn commented

I believe it was solved removing delays