-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic reboot after wdt reset #1017
Comments
mode:(1,6) means bootloader mode, you need to add resistors like here: |
Thank you for this info. I added all these resistors. |
if you have added all the resistors, and you call |
Thank you for your fast reply. I was not clear enough: When my board crashes, it shows the message wdt reset mode:(1,6) and does nothing anymore until I reset it manually. With your explanation, this behavior is clear: The bootloader waits for something to happen. In this situation, my sketch has no control over the board anymore and I cannot issue the command ESP.restart(). Only manual intervention (ground the reset pin) helps to restart the sketch. But I would like to avoid this manual reset and do it automatically after the watchdog showed its message. |
ok now i get it,
you need to make sure that the pins in the right state when a wtd happens or you call ESP.restart() better you add some delays to prevent the wtd from triggering. |
This requires some investigation. I have noticed that sometimes my nodemcu On Sat, Nov 14, 2015, 14:37 Markus [email protected] wrote:
|
You were absolutely right! The problem is my GPIO0 pin. I pull it up with an Attiny85. I use this method to generate the necessary timing (together with REST). Always after I do the uploading, GPIO0 starts to oscillate from 3.1 to around 2 volts (with 26 MHz!). And in this state, the ESP goes into bootloader mode and stays there: Soft WDT reset
ets Jan 8 2013,rst cause:2, boot mode:(1,7) ets Jan 8 2013,rst cause:4, boot mode:(1,7) wdt reset If I do a (manual) hard reset with everything exactly the same as before, this happens repetedly: Begin Soft WDT reset ctx: cont
ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 1264, room 16 and GPIO0 does not oscillate at all. So, I have to invetigate into my uploading logic. |
With mynodemcu 1.0 esp12e after flash system is blocked and I must cut off power . After this every time I do reset system work perfect Sent from my iPhone
|
An additional info: I added a small capacitor to GPIO0 (47nf to GND) and the level of the pin stays now above 3V. The same behavior appears. So, it might have another source. The board is an ESP-7. |
At now i can not test , but why use a while(1) in function loop ? It's same Sent from my iPhone
|
You can use while (1) . You are right. It is the same. |
ok but loop in a loop ?
|
without the while loop the ESP does not crash, at least not in my case. And I wanted to see if the module restarts into the setup() after a crash or if it stays in the bootloader loop (see descriptions above). |
|
Linking #793, which is pretty much the same issue. |
I have the same issue (ESP.reset() causes wdt reset and hangs). Here are my test findings. I am using nodemcu board. GPIO0,GPIO0 are pulled up, and GPIO15 is pulled down. Test code
First time run:
And is stuck here. If I repower the device, then Every run then on shows
And resets, reboots successfully. So, something is happening after the first repowering? Because, after that it runs smooth. as expected. |
more info about the boot messages see here: the boot mode looks wrong in the first case, check the GPIO0 its is at 0V to get mode 1, you need mode 3 to boot to the sketch. |
@Links2004 given GPIO0 is pulled up to 3.3V on my board and the fact that I need to press a button (from GPIO0 to GND) under normal circumstances to program it, any clue why this is happening? I tried with different power supplies, but this behaviour persists. |
@Links2004 I did some additional digging with a scope to see what is happening. ESP WDT RESET and GPIO0 states on first run.pdf A sample Serial debug output below.
|
I use 3K3 pullups, does lower values reduce the sine wave? |
@drmpf I did not change the resistor, but I tried multiple caps from GPIO0 to GND (ie, across the switch as a simple debouncer), and that did bring the oscillation value down considerably. I tried 1uf, and 10pf. |
Also a 0.1uF from VCC to GND, close to the ESP supply pins (actually mine is not that close) |
Yes, thats there (10uF||0.1uF). Also, I just tried a 3.3k pullup on GPIO0, no difference. Are you having this WDT reset issues too? Also, Is there any way to set a call back when this silly WDT reset happens? apparently it is printing wdt reset, so wondering if we can do a call back from there. |
I am not have a problem, I think. Occasionally I don't get a clean power up, but not often. |
As per scope, 26.0003MHz |
I am using the staging version. I think I should try the stable version and see if this goes away. |
I was having the same problem using the ESP12E, the solution i found was not to use the <WiFi.h> libary but instead the <ESP8266WiFi.h> libary, hope it helps. |
Closing. Soft reset is not supported after serial flashing. |
If esptool is doing hard reset should this not be a problem ? according to esptool reset hard is an option and ( default ) https://github.com/espressif/esptool/wiki/Advanced-Options I think this is -cr in .exe Which is in the builder already, so it is not working ?
That should do a hard reset and allow soft resets no ? I see it missing in platformio builder, not sure about arduino. |
@tablatronix thanks, that seems to work, at least with the boards at hand. |
wow thanks for testing it, i have not had to time to look into it to see if I was right, ( I was looking into that as a way to add a reset button to my ide , which I thought would be useful also ) |
The -cr addition was working when I tested it above, including no more double WDT when doing a soft restart after reflashing, but for some reason it isn't working now. After flashing is done I now see an error message in the console. I've reverted #5433 with #5460 until we figure out what's going on. |
Hi! Sorry for my mistakes, my mother tongue is not English. |
@devyte care to share what the error was? If I have time I will try to pull that commit back in and test, but I probably wont have time for awhile |
Is this message for devyte or jjnoui?
Envoyé depuis un mobile Samsung.
<div>-------- Message d'origine --------</div><div>De : Shawn A <[email protected]> </div><div>Date :17/01/2019 18:13 (GMT+01:00) </div><div>À : esp8266/Arduino <[email protected]> </div><div>Cc : jjnoui <[email protected]>, Comment <[email protected]> </div><div>Objet : Re: [esp8266/Arduino] Automatic reboot after wdt reset (#1017) </div><div>
</div>@devyte care to share what the error was? If I have time I will try to pull that commit back in and test, but I probably wont have time for awhile
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@jjnoui it was for me. Thank you for your idea, but your workaround can't be adopted here given that it requires an additional pin. Instead, we need to find a solution to the underlying problem. |
@devyte Ok! It was a workaround only for those have a free pin. |
@tablatronix I'd have to retest and try to get the error message again. I don't know why it worked at first, and then 5 days later it didn't. |
4 years, no fix? |
I have to take a look at this soon, I am doing alot of development over ota, So i should have some time to at least test |
My only trouble so far is in using an MCP23017 I/O expander on I2C and the bus will not restart after a flash. OTA and direct flash have same effect. I've tried a few of the slave reset tricks, but none of them worked. It always fails to find devices until I GND the reset pin on the ESP, or power-cycle it. Does anyone know if the ESP32 has the same problem? I might just have to ditch my 8266's if that's the case. |
Currently esptool.py is resetting via RTS, so I think this is done. Closing. |
Only during a connected flash on more robust hardware. OTA doesn't receive this, nor do the ESP-01(s) modules. |
My boards crash from time to time and I do not know why. After such crash the wd reset shows up (boot mode:(1,6)), but the board does not restart automatically. How can I make the boards reset/restart automatically after a wdt reset?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: