Reboot causes

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
pawel3410
New user
Posts: 5
Joined: 24 Aug 2016, 11:44

Reboot causes

#1 Post by pawel3410 » 24 Aug 2016, 11:49

First I want co congratulate this wonderfull project.
Sometimes my ESP01 is rebooting without any visible reason, so it was be great to know this reason. It is possible to publish reboot causes after boot?

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: Reboot causes

#2 Post by Drum » 24 Aug 2016, 14:04

Have a look at the bottom of the main page on the ESP. There is a boot cause field. I don't think it will tell you what you want to know, as I don't think the system has the ability to diagnose what part of the problem. It will give you "Cold Boot" if you unplug and plug in again, "Manual Reboot" if you reset, and maybe probably something for the watchdog. Watchdog would probably indicate a software issue, and cold boot would probably indicate a power issue. I think that is about all you will get. Not sure what it gives if you short a pin and cause a reboot.

Search and read, you will find a wealth of information...

dzikus
Normal user
Posts: 17
Joined: 12 Jul 2016, 09:55

Re: Reboot causes

#3 Post by dzikus » 24 Aug 2016, 19:10

Read carefully http://www.esp8266.nu/index.php/Power . All my reboot problems was from power issues.

Pozdrowienia z Tychów :).

dduley
Normal user
Posts: 93
Joined: 06 Feb 2016, 17:56

Re: Reboot causes

#4 Post by dduley » 24 Aug 2016, 22:14

pawel3410 wrote:First I want co congratulate this wonderfull project.
Sometimes my ESP01 is rebooting without any visible reason, so it was be great to know this reason. It is possible to publish reboot causes after boot?
Hi Pawel,

Reboots can be troublesome and I have experienced them quite a bit trying to get my system up and running. I currently have 18 ESPs running ESPEasy on my network and they are all working quite well.
What version of ESPEasy are you using? You must assign a unit number between 1 and 30 (unless you have modified the code to allow higher). If you don't this could cause resets. Under Tools\Advanced there is a field called Connection Failure Threshold. The original default value was 30 so if you had 30 MQTT connection failures the ESP would reset. Set this to 0 for awhile and see if your problem gets better.
Did this problem just start with a firmware upgrade or have you always had the issue? I have noticed sometimes when you upgrade firmware the internal storage can get messed up as to any tasks etc that you might have previously set up. The ESP will usually just act weird like fields entered while assigning tasks will not show up (Things like value names etc). If left to run the ESPs will reset a lot. You can go to the tools menu and issue a "RESET" command in the command dialog. This will return the ESP to its default state including making it forget all of the router settings. You will need to re-do all of the settings.
Power is also a big issue. I manufacture several ESP based boards and I routinely use 3.3 volt regulators. (Specifically the LT1129CST-3.3) I get them in bulk from China. I had one batch that looked and smelled and for the most part acted like the LT1129CST-3.3 but when asked to provide more than 200ma they would drop down to 1.5 volts. Naturally this caused a reset. Make sure your power supply can really output at least 600ma. Add the caps to your circuit just like the blog post suggests and others have pointed you towards.
Is your circuit switching relays on and off? Does it reset occasionally when the CPU tries to close the relay? If so you might have some power spiking when the coil is energized. This can be handled by putting a larger power supply. You can try to put a very large capacitor across you power and preferably do not try to energize the coil with the same power rail that's providing power to the CPU.

Tell us more about your circuit!

I hope this helps

Best regards

Dave

pawel3410
New user
Posts: 5
Joined: 24 Aug 2016, 11:44

Re: Reboot causes

#5 Post by pawel3410 » 24 Aug 2016, 23:03

My problem is little complicated. I have one ESP12 with 108 espeasy version. Connection Failure Threshold is set to 0. I set static IP and connect to router with WIFI. Everything is ok (so supply is ok) until connecting raspberry pi3 with wire to router. ESP is start rebooting after 1-5 minutes and I dont know what is the reason. What is must to be done to reboot ESP without reboot command?.

dduley
Normal user
Posts: 93
Joined: 06 Feb 2016, 17:56

Re: Reboot causes

#6 Post by dduley » 25 Aug 2016, 01:56

Is your static IP address within the DHCP address range? Is your RSPi also a static IP? Could they be the same address?
Can you set the Serial logging to level 4 and connect to the ESP via USB and a terminal program? Watch the logging and see if you get any clue there.

Regards

Dave

pawel3410
New user
Posts: 5
Joined: 24 Aug 2016, 11:44

Re: Reboot causes

#7 Post by pawel3410 » 25 Aug 2016, 10:42

Static IP in esp12 and raspberry is outside DHCP range and they have different address. esp12 is only one device connected to wifi. Today I will try connect another esp12 with serial terminal and watch logs.

pawel3410
New user
Posts: 5
Joined: 24 Aug 2016, 11:44

Re: Reboot causes

#8 Post by pawel3410 » 25 Aug 2016, 15:35

I have this when device is in reboot loop :/

Code: Select all

Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x40227e85, epc2=0x00000000, epc3=0x00000000, excvaddr=0x3ffeecfd, depc=0x00000000

Exception (9):
epc1=0x40227e85 epc2=0x00000000 epc3=0x00000000 excvaddr=0x3ffeecfd depc=0x00000000

ctx: sys 
sp: 3ffffda0 end: 3fffffb0 offset: 01a0

>>>stack>>>
3fffff40:  40227e65 00000000 00000001 00000100  
3fffff50:  4022a4bf 3ffeecb0 00000040 00000001  
3fffff60:  3ffe8004 00000006 00000000 3ffee7b4  
3fffff70:  3ffee2c0 40226abf 00000006 00000000  
3fffff80:  3ffee2c0 402264b6 3fffdab0 00000000  
3fffff90:  3fffdcc0 3ffeaab0 00000000 40222957  
3fffffa0:  3ffeaab0 40000f49 3fffdab0 40000f49  
<<<stack<<<

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

wdt reset
load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x42
csum 0x42
~ld
ŞU
INIT : Booting Build nr:108
bcn 0
del if1
usl
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
bcn 0
del if1
usl
mode : sta(18:fe:34:d5:a2:cc)
add if0
IP   : Static IP :192.168.1.202
WIFI : Connecting... 1
f r-1, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt 
And sometimes this:

Code: Select all

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

wdt reset
load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x42
csum 0x42
~ld
ŞU
INIT : Booting Build nr:108
bcn 0
del if1
usl
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
bcn 0
del if1
usl
mode : sta(18:fe:34:d5:a2:cc)
add if0
IP   : Static IP :192.168.1.202
WIFI : Connecting... 1
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt 

dduley
Normal user
Posts: 93
Joined: 06 Feb 2016, 17:56

Re: Reboot causes

#9 Post by dduley » 25 Aug 2016, 23:31

Hi Pawel,

The first log has the Fatal Exception 9 issue. I have seen this many times when I have had power issues. That is exactly what mine did when I had the bogus voltage regulators. Do you have an oscilloscope? I would put a scope probe on the +3.3V rail and watch it. You might need to trigger properly to see it. You might find a significant dip in the supply voltage when the processor tries to transmit. You also might try hanging a really large capacitor on the 3.3V rail. Try 1000uf and see if the problem improves.

regards

Dave

Zodiac69
Normal user
Posts: 85
Joined: 13 Jun 2016, 17:20

Re: Reboot causes

#10 Post by Zodiac69 » 03 Sep 2016, 16:26

Power, Power and more power.

In my experience there is only two power related issues that cause units to reboot.
1. The most important one - CLEAN Power.
Make sure your power on the unit is "Clean". I always put an inductor inline with the micro controller supply pin with a 100nF cap as close to the supply pin as possible. You can now buy a unit that has both in one three pin module.Bad or "dirty" power is most often the cause of random reboot.

2. Current, or the lack there of.
Many designs under estimate the power requirements and try to get away with the minimum. This is most often the cause of reboot.

JR01
Normal user
Posts: 260
Joined: 14 Feb 2016, 21:04
Location: South Africa

Re: Reboot causes

#11 Post by JR01 » 03 Sep 2016, 17:50

Hi zodiac69, re
"inductor inline with the micro controller supply pin with a 100nF cap as close to the supply pin as possible. You can now buy a unit that has both in one three pin module"

Could you guve us a link to an example unit, say on eBay?
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

pawel3410
New user
Posts: 5
Joined: 24 Aug 2016, 11:44

Re: Reboot causes

#12 Post by pawel3410 » 04 Sep 2016, 19:14

Like you say it was a power supply problem. ESP was powered from mini360 3,3V module and other mini360 5V was for contactors. Now one mini360 5V is for contactors and from this AMS1117 3,3V for ESP. For now reboot problem is gone;)

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests