aster94 / logic-analyzer

Logic Analyzer, for Arduino, AVR, ESP8266 and STM32 with a very nice working processing interface, you could run it also on any Android device.
GNU General Public License v3.0
351 stars 77 forks source link

ESP8266 not working, 'reset' everytime #13

Open cszuo opened 5 years ago

cszuo commented 5 years ago

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.

aster94 commented 5 years ago

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

cszuo commented 5 years ago

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.

aster94 commented 5 years ago

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

yoursunny commented 5 years ago

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.

aster94 commented 5 years ago

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?

yoursunny commented 5 years ago

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

toncho11 commented 4 years ago

Does it work with ESP8266?

BackMountainDevil commented 2 years ago

Does it work with ESP8266?

test not work now.