Need to understand watchdog resets
Posted: Thu Jun 29, 2017 11:44 pm
Hi all, I'm pretty new to ESP8266 and "modern" embedded systems. (My background includes building embedded systems 30 years ago on chips that had 256 bytes of RAM, so I'm not completely unaware of concepts, but am essentially unfamiliar with the current state of things).
My problem is that I have a piece of software I created for my ESP-12E board. It works well by itself, but I'm trying to add WiFi networking to it. I also have some very simple tests of WiFiManager, and UDP send/receive that work well (with the same LEDs lit up as the primary piece of code). However, if I attempt to start networking inside this primary software, it blows up reliably.
I can start WiFi.begin, providing explicit credentials for my network, or I can use WiFiManager, it fails the same way (even though it works in isolation from my actual application).
I can get through my startup() function, achieve a connection and IP address, and actually enter the loop function (which currently does nothing whatever with networking) and then it dies and goes into some kind of reset.
So, the root of my problem is that I'm not sure why.
I don't think it's the power supply issues I've read about, since I'm able to turn all the LEDs on, and still execute networking (including send and receive messages) successfully. But, I suppose I can't be sure.
But I also don't think it's the WiFi code, since I'm not even doing anything other than launch the connection (which has succeeded) when it fails.
I don't think my software is taking too long in the main loop, but again, I'm not sure how I'd know.
I did try disabling the watchdog, but although the code compiled and uploaded, I don't know for sure if I got the code right. Certainly no difference was observed.
What should I read to try to start to understand this?
TIA,
Toby
My problem is that I have a piece of software I created for my ESP-12E board. It works well by itself, but I'm trying to add WiFi networking to it. I also have some very simple tests of WiFiManager, and UDP send/receive that work well (with the same LEDs lit up as the primary piece of code). However, if I attempt to start networking inside this primary software, it blows up reliably.
I can start WiFi.begin, providing explicit credentials for my network, or I can use WiFiManager, it fails the same way (even though it works in isolation from my actual application).
I can get through my startup() function, achieve a connection and IP address, and actually enter the loop function (which currently does nothing whatever with networking) and then it dies and goes into some kind of reset.
So, the root of my problem is that I'm not sure why.
I don't think it's the power supply issues I've read about, since I'm able to turn all the LEDs on, and still execute networking (including send and receive messages) successfully. But, I suppose I can't be sure.
But I also don't think it's the WiFi code, since I'm not even doing anything other than launch the connection (which has succeeded) when it fails.
I don't think my software is taking too long in the main loop, but again, I'm not sure how I'd know.
I did try disabling the watchdog, but although the code compiled and uploaded, I don't know for sure if I got the code right. Certainly no difference was observed.
What should I read to try to start to understand this?
TIA,
Toby