-->
Page 1 of 1

ESP8266 - Soft WDT reset

PostPosted: Mon Mar 15, 2021 7:04 am
by Bhumika
Hi,

I have a project running on generic esp8266 module.
In that module, each time I lose connectivity to wifi network I save my data in EEPROM and once connectivity is back, I send that data to gateway and hence EEPROM read and writes are quite frequent in my ESP due to frequent reconnects to the wifi network.

Now after some time of use, my EEPROM write has failed.
I am encountering the following error:

Code: Select all--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffce0 end: 3fffffc0 offset: 01a0
3ffffe80:  00000002 40105a43 00000001 60000200 
3ffffe90:  00000002 4000410f 00001001 00000205 
3ffffea0:  3fffc718 40004a3c 000003fb 00000001 
3ffffeb0:  3fffc718 40105cd4 000003fb 3ffef5dc 
3ffffec0:  4020ae86 3ffef6d0 3ffe87ff 000000b1 
3ffffed0:  3ffef758 00000001 3ffef6d0 40208917 
3ffffee0:  3ffef5dc 00000001 00000004 4020104c 
3ffffef0:  3ffef5b8 3ffef6d0 3ffef778 3ffef5dc 
3fffff00:  3ffef5b8 3ffef6d0 3ffef5c4 402012fd 
3fffff10:  00353500 0010001f 80fef778 3fff0d00 
3fffff20:  001c001f 80fef778 00353500 4020b124 
3fffff30:  8020b118 3ffef778 3ffe87ff 4020b509 
3fffff40:  000000ff 00000001 00000000 4020b6c4 
3fffff50:  3fffdad0 00000000 3ffef778 3ffef8a8 
3fffff60:  3fffdad0 00000000 3ffef868 402052e3 
3fffff70:  feefeffe feefeffe feefeffe feefeffe 
3fffff80:  feefeffe feefeffe feefeffe feefeffe 
3fffff90:  feefeffe feefeffe feefeffe 3ffef8a8 
3fffffa0:  3fffdad0 00000000 3ffef868 4020d9f8 
3fffffb0:  feefeffe feefeffe 3ffe84f4 40100d39 
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

 ets Jan  8 2013,rst cause:2, boot mode:(3,3)

load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld



Please tell what this Exception decode status means.
I erased all the flash content, still, my EEPROM is not working on the freshly programmed board.

Re: ESP8266 - Soft WDT reset

PostPosted: Tue Mar 16, 2021 11:24 am
by eriksl
I have answered this question almost exactly the same within the last week...

The watchdog gets active when the "SDK base code" hasn't been called for some time. This code handles Wifi and a few other low-level stuff. It can't work if it doesn't get called timely. Also the watchdog prevents the Wifi from being jabbered when some user code crashes.

The stack, that you supplied, does not give any useful information in this case.

Here is the thing: you can't call the SDK base code directly. This is code that is started automatically at boot and then it calls your code. So the only way to make it run, is to return to that code. In practice this means you should only run small parts of code and use timers and events to run them.

A program consisting of "for(;;) do_someting();" will not work and the watchdog will intervene.

Of course this all about programming the native SDK, it's not about arduino. I assumed native SDK as you did not specify what SDK you're using.

Re: ESP8266 - Soft WDT reset

PostPosted: Mon Apr 12, 2021 8:17 pm
by gibo77
Looks like we have the same issue. But I was able to fix it.

I also have watch dog timer WDT, Exception errors (1) (28) (9). You name it all crashes are there.
So I tried to a different board, it never crashes. So the issue is not software but hardware.
I can see you are using generic ESP8266 which is the same as mine.
I compared my two boards and the difference is the electrolytic capacitor that I installed for the 3.3VDC power supply of the ESP8266. That solved my problem.

Also the more program you have the more energy it requires so it seems. When I install basic blinker it does not crash. But when I installed the 47uF capacitor, my big program 679 lines is not crashing anymore.

For your case try buying a kit first like WEMOS D1. So that you don't have to deal with the power supply.
How did you power up your ESP8266?