I’ve got about half a dozen ESP8266 all over the house, running 24/7, mostly temperature loggers, reporting their values using WLAN to an MQTT broker. With one exception, they are all ESP-01s (the very small ones with the 2 x 4 pin header).
Some of them get stop working, at very different time scales: Even the ones that run worst take some months to show this behaviour. When I interrupt the power supply for a short time, they work flawless for some more months, before the same happens again. Sometimes weeks, sometimes years.
When this happens, the blue LED is on permanently, indicating it’s sending a lot of stuff on the serial command line. Today I hooked up a serial monitor to an ESP-01. It shows the following output ate 115200 baud, the standard baudrate of my program:
Fatal exception (0):
epc1=0x400ef424, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
epc1=0x400ef424, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
Fatal exception (0):
ep▒XS▒▒exception (0):
epc1=0x400ef424, epc2=▒▒▒ѥ▒▒▒(0):
This goes on forever.
According to Espressifs documentation, “Fatal exception (0)” is an ‘Invalid command’, caused either by damaged BIN binaries or wild pointers.
It is not a wild pointer, since the code is running for months successfully. So maybe a memory cell went corrupt.
A post in the ESP8266 community forum traces this error message back to a high level in GPIO2, which is indeed HI in my design (GPIO0 and GPIO2 have pull-ups for I2C communication). Pulling it manually low did not stop the flow of error messagen.
Doing a manual reset by connecting the RST pin to GND did change the behavour: The error messages continued to show (with exactly the same text!), but this time at a baud rate of 73880. This is the native baud rate of the ESP’s BOOT ROM, so the processor did not get to the place in my program where it changes the serial baud rate.
Disconnecting and connecting the power supply solved the problem. The ESP is running as expected and does it job.
MY ESP8266 come from all sources, I cannot tell any more wherefrom. So there might some which have a memory problem.
Debugging this problem is extremely hard, since it takes weeks or months to show up.
Thus my question, have you experienced something simmilar and could you resolve it?
5