system_restart() hangs

FrenkR
Posts: 44
Joined: Thu Dec 04, 2014 9:25 am

system_restart() hangs

Postby FrenkR » Wed Jun 10, 2015 6:18 am

I implemented functionality to process device reboot on user request (module acts as listener/web server). SDK is 1.0.1. After I call system_restart(), most of time only "wdt reset" message is displayed and system doesn't fully reboot.
Debug on UART1 is as follows:

Code: Select all

System will be rebooted... <-- my own message, notifying that system_restart() was called
 
station: 2c:f0:ee:e7:fc:ad leave, AID = 1
rm match
bcn 0
del if1
usl
sul 0 0

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

wdt reset


Are there any rules to take care of to successfully reboot device?
Rgds,
Frenk

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: system_restart() hangs

Postby ESP_Faye » Wed Jun 10, 2015 10:50 am

Hi,

It seems that your GPIO 0 is not in high level.

While downloading bin files, it is MTDO: 0, GPIO 0 : 0, GPIO 2 : 1

While running program, it needs to be MTDO: 0, GPIO 0 : 1, GPIO 2 : 1

Thanks for your interest in ESP8266 !

YimingLi

Re: system_restart() hangs

Postby YimingLi » Wed Jun 10, 2015 11:51 am

Espressif_Faye wrote:Hi,

It seems that your GPIO 0 is not in high level.

While downloading bin files, it is MTDO: 0, GPIO 0 : 0, GPIO 2 : 1

While running program, it needs to be MTDO: 0, GPIO 0 : 1, GPIO 2 : 1

Thanks for your interest in ESP8266 !



Add a little more. It seems that we should make sure a low level of GPIO0 have been sampled during the last "POR(Power on Reset)or reset pin reset to the chip. Just with a wdt reset for any reasons, the boot selection pins might not be sampled even you released the GPIO0 during the wdt reset, and you may check to find that the boot_sel in the boot info are still (1,6) as an example. That is, we may have to have POR to the chip or provide a low-to-high transient to the nReset pin with the GPIO released.

FrenkR
Posts: 44
Joined: Thu Dec 04, 2014 9:25 am

Re: system_restart() hangs

Postby FrenkR » Sun Jun 14, 2015 4:46 am

yes, problem was only when device was connected to TTL uart device, when DTR and CTS are used fr restart and debug mode. after disconnecting it, system always restart. Thanks.

Who is online

Users browsing this forum: No registered users and 112 guests