Skip to content

hanging ESP.restart() #1722

Closed
Closed

Description

@Pfannex

Hi,

what´s the difference between

ESP.reset() and ESP.restart()?

Both work, but sometimes the ESP does not starts again.

working restart:

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x42
csum 0x42
@cp:0 ld    <------ this means it work

hanging restart:

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

wdt reset    <----- this means it does not work

Activity

  1. Links2004 commented on Mar 5, 2016

    @Links2004
    Collaborator

    ESP.reset() is a hard reset and can leave some of the registers in the old state which can lead to problems, its more or less like the reset button on the PC.

    ESP.restart() tells the SDK to reboot, so its a more clean reboot, use this one if possible.

    the boot mode:(1,7) problem is known and only happens at the first restart after serial flashing.
    if you do one manual reboot by power or RST pin all will work more info see: #1017

  2. Pfannex commented on Mar 6, 2016

    @Pfannex
    Author

    OK, thanks for your explanation......

    I was reading the ESP.restart() issues.
    But is there a final solution or is the, manually reset after serial flashing, the latest work around?

  3. Links2004 commented on Mar 6, 2016

    @Links2004
    Collaborator

    yes, the manually reset after serial flashing is the latest work around.
    the problem is some code in the hard coded Silicium part of the ESP8266.
    there may is a register / ram address which store the mode to boot in, but no one has find it yet.
    Its dam hard to search for.

  4. Pfannex commented on Mar 6, 2016

    @Pfannex
    Author

    OK, thanks....

    I think, I can live with it...... :-)

  5. PhilColbert commented on Apr 18, 2016

    @PhilColbert

    Would it be possible for the ESP gurus to write a README guide to the ESP, just a list of known issues that a newbie could read, I just spent a few hours trying to work out why system restart seemingly randomly works... and this is why, would be great to have a list of known strange issues someone just starting with the ESP could read and save a lot of headaches ! :)

    For some reason , this only happens with larger programs, if you just upload a program with the system restart command in and that is it, it works fine.... not sure if that helps ?

    Thanks

  6. aidanruff commented on Mar 24, 2017

    @aidanruff

    I've had the same problem, even with a pull up on GPOIO#0, it didn't work.

    Then I reasoned that as I was using GPIO as an output, maybe the hardware wasn't reseting it to an input on a soft reset, so the reset would depend upon the state of GPIO#0.

    So, I set GPIO#0 high before doing the restart and it works!

  7. pyjsql commented on Aug 11, 2017

    @pyjsql

    i have a solution;
    WiFi.forceSleepBegin(); wdt_reset(); ESP.restart(); while(1)wdt_reset();

    close WiFi; forceSleepBegin();
    and reset wdt contuniously.

  8. karenYerevan commented on Jan 2, 2018

    @karenYerevan

    hi there
    i have ESP8266-12, it is have other power
    I flashing esp8266 from arduino uno
    Flashing programm (XTCOM_UTIL)
    aruduino uno -- esp8266
    RX -> RXD
    TX -> TXD
    GND -> GND,GPIO0

    After flashing all AT commands worck good.
    But when esp8266 is restart (AT+RST) , AT commands stopping works
    and show this text

    AT
    OK

    AT+RST
    OK

    ets Jan 8 2013,rst cause:4, boot mode:(1,7)
    wdt reset

    img_0291

    who can help me ???

  9. devyte commented on Jan 2, 2018

    @devyte
    Collaborator

    @karenYerevan this repo has nothing to do with the AT command set. I suggest asking at a community forum like esp8266.com.

  10. jkandasa commented on Jan 2, 2018

    @jkandasa

    @karenYerevan AFAIK, after flash via serial, you need to do a hard/manual reboot at the very first time(power OFF and ON, ESP8266).

    See in this comment

  11. karenYerevan commented on Jan 2, 2018

    @karenYerevan

    yes i done that many many time, but that dosnt worck

  12. royseberg commented on May 6, 2018

    @royseberg

    If a GPIO pin is set high or low prior to restart, will it remain in that state after the restart? I want to remember that state when the program reboots, if that makes any sense.

  13. devyte commented on May 6, 2018

    @devyte
    Collaborator

    GPIO pins will be re-inited before setup()

  14. garyrylander commented on Dec 26, 2018

    @garyrylander

    You have to have a jumper on D0 and Rst. That worked for me

  15. added a commit that references this issue on Jan 13, 2019
  16. verygoodguy commented on Aug 1, 2023

    @verygoodguy

    Does reset cut full power?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions