logic-analyzer icon indicating copy to clipboard operation
logic-analyzer copied to clipboard

ESP8266 not working, 'reset' everytime

Open cszuo opened this issue 4 years ago • 8 comments

Thank you for the project, it would be very helpful when debugging protocols.

I am using it on nodemcu (ESP8266), but every time when sending 'G' to the ESP8266, will cause it to reset. The error message:

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

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld

I tried to debug, it looks like collect(); cased this problem. Do you have any idea? Thank you.

cszuo avatar Oct 14 '19 17:10 cszuo

It is a function inside the esp core. Can you post all the errors you get?

aster94 avatar Oct 16 '19 22:10 aster94

It is a function inside the esp core. Can you post all the errors you get?

this is all the error I got from Serial port.

cszuo avatar Oct 16 '19 22:10 cszuo

My bad, the function isn't from the core, I haven't watched into the esp code in a lot of times and I didn't remember it

Maybe @yoursunny knows something about this

aster94 avatar Oct 16 '19 22:10 aster94

rst cause:4

This RST cause means "hardware watchdog reset".

The ESP8266 has two watchdogs: a software watchdog and a hardware watchdog. If either watchdog determines our code is stuck, it will reset the device. Before calling collect(), I use ESP.wdtDisable() to disable the software watchdog. However, if collect() executes for more than six seconds, the hardware watchdog will reset the device.

collect() waits for GPIO register to change N_SAMPLES times. If GPIO lines are not changing, it will wait in a loop, and eventually exceed hardware watchdog duration. Thus, if the signal you are trying to measure has very low frequency or appears only once, you'll get "rst cause 4" error.

yoursunny avatar Oct 30 '19 23:10 yoursunny

Thanks for the explanation!

However, if collect() executes for more than six seconds, the hardware watchdog will reset the device.

Do you know any way to prevent the watchdog to reset?

aster94 avatar Nov 01 '19 18:11 aster94

Software watchdog is already disabled. Hardware watchdog cannot be disabled from Arduino code.

yoursunny avatar Nov 12 '19 03:11 yoursunny

Does it work with ESP8266?

toncho11 avatar Feb 06 '20 11:02 toncho11

Does it work with ESP8266?

test not work now.

BackMountainDevil avatar Oct 23 '22 07:10 BackMountainDevil