ESP 8266 Problems

Playing with ESP 8266 this weekend, using the Adafruit HUZZAH breakout board. Thought I’d write a quick post for a couple of problems I encountered– the second having just one Google result (in Russian, and unsolved)!

First problem: the Adafruit documentation says that the module should flash both the red and blue LEDs when connected. Mine didn’t. I was using a USB-TTL Serial Cable pretty much identical to the one on the Adafruit site, acquired with a Raspberry Pi purchase many years ago. Perhaps obviously, this turned out to be a power supply issue. I guess the cable just wasn’t supplying enough power. I tested it with a multimeter and got 5V on the VCC pin, but I guess it was causing brownouts for the module.

Even though the LED for GPIO 0 lit when pressed, the module wasn’t booting properly as it wasn’t receiving enough power. I suspected this when I wasn’t even able to put it into bootloader mode (hold GPIO 0, press ‘reset’, release GPIO 0) where the red LED lights at half brightness.

I solved it by running the VCC and ground wires to my bench supply, which was set to 5V. The module gave the characteristic blue and red flash on reset, so it looked like all was well.

Second issue: another brownout.

Fatal exception (0):
epc1=0x4021d380, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

I finally got the module to talk to me over serial, but was getting garbage out. The Adafruit module comes preloaded with NodeMCU and is supposed to give a Lua prompt on boot. After checking the baud rate (9600 baud) was correct, I tried it instead at 115200 Baud to see if I got anything useful out. Yes; a “Fatal exception (0)” error message. I got a couple of different error codes with it: the above, and one with “epc1=0x4021d820“.

After a bit of a think and some non-productive Googling, I began to suspect that this too was a power issue, whereupon I realised my bench supply was set to *current limit* at 200mA. The module doesn’t draw this much while running, but I guess it was momentarily on boot.

Clearing the current limiting on the PSU got the module to boot to the Lua prompt correctly, so evidently this error code was related to a power brownout on boot in my case.

Hope this helps anyone who ever searches for “epc1=0x4021d380” again! Now onto some actual coding!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.