Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By uncletammy
#42080 Hey guys,

Long time listener, first time caller.

I have two ESP12E modules. One came mounted to a NodeMCU breakout board.
https://drive.google.com/file/d/0BwFbwC ... sp=sharing

The other is a generic board that I have wired myself (see pics for wiring)
https://drive.google.com/file/d/0BwFbwC ... sp=sharing
https://drive.google.com/file/d/0BwFbwC ... sp=sharing

I am able to upload sketeches to both of them using the Arduino IDE (version 1.6.8 with version 2.1.0 of Arduino core for ESP8266).

Both boards produce identical output from the CheckFlashConfig sketch. They behave the same until I try to use a sketch that connects to Wifi. Then, the NodeMCU board works but the generic board panics. Sketches that don't connect to Wifi work fine on both. My operating system is Debian (Jessie).


#### Hardware
Hardware: ESP12E
Core Version: 2.1.0 ( I don't know which revision)

### Settings in IDE

Module: Generic ESP8266 Module
Flash Size: 4MB w/ 1MB SPIFFS (tried all 4MB settings)
CPU Frequency: 80Mhz (tried 40Mhz also)
Flash Mode: qio
Flash Frequency: 80Mhz (tried 40Mhz also)
Upload Using: SERIAL
Reset Method: ck

### Sketch

The sketch I'm running is the original CheckFlashConfig script modified to connect to my local wireless network. You can see it at https://gist.github.com/uncletammy/198fec767a8e4803e6af


Here are the debug messages from both boards

##### From NodeMCU board
tail 0
chksum 0x42
csum 0x42
Flash real id: 001640E0
Flash real size: 4194304

Flash ide size: 4194304
Flash ide speed: 40000000
Flash ide mode: DIO
Flash Chip configuration ok.

Joining network
Connected using IP:
10.100.20.136
And MAC address:
5C:CF:7F:0B:70:E0
...still connected!

...still connected!

...still connected!

##### From generic board

Flash real id: 001640E0
Flash real size: 4194304

Flash ide size: 4194304
Flash ide speed: 40000000
Flash ide mode: QIO
Flash Chip configuration ok.

Joining network
[WIFI][APlistAdd] add SSID: myNetworkName
[WIFI] delete old wifi config...
there is no poison after the block. Expected poison address: 0x3fff0ff8, actual data: 0x0 0xef 0xef 0xfe

Panic /home/tink/arduino-nightly/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c:851 check_poison_block

ctx: cont
sp: 3fff0090 end: 3fff04d0 offset: 01b0

>>>stack>>>

The decoded stack trace can be seen here: https://cloud.githubusercontent.com/ass ... d33dbe.png

I'm starting to think it's a hardware issue rather than a software issue. Is it possible that as the ESP starts drawing more power (because the network stack is getting started), my circuit is failing to deliver the necessary power to ESP? That's all I can come up with. I appreciate any help or advice. Thanks!
User avatar
By krzychb
#42095 Hi uncletammy,

I believe inconsistencies are due to long connecting wires I see on pictures of your generic board.

In particular panic is most likely caused by not enough power delivered to the module over long wires when Wi-Fi is on.

I recommend checking this excellent video by Andreas Spiess that presents current spikes drawn by ESP with Wi-Fi on and discusses ways to eliminate them.

I see you have a decoupling electrolytic capacitor on your power rail to eliminate spikes but it may be not big enough. Also I would solder it right at ESP12E module terminals if you have to have long power supply wires.

Also it is a good practice to add ceramic decupling capacitors (in addition to electrolytic) – please check this tutorial.

In general I would make all the wires short just to reach the breadboard to reduce emission and collection of electric noise. There are documented issues with ESP reset line vulnerable to noise if connection is long.

Hope this will help and post your troubleshooting results :D

Krzysztof
User avatar
By uncletammy
#42117
krzychb wrote:Hi uncletammy,

I believe inconsistencies are due to long connecting wires I see on pictures of your generic board.

In particular panic is most likely caused by not enough power delivered to the module over long wires when Wi-Fi is on.

I recommend checking this excellent video by Andreas Spiess that presents current spikes drawn by ESP with Wi-Fi on and discusses ways to eliminate them.

I see you have a decoupling electrolytic capacitor on your power rail to eliminate spikes but it may be not big enough. Also I would solder it right at ESP12E module terminals if you have to have long power supply wires.

Also it is a good practice to add ceramic decupling capacitors (in addition to electrolytic) – please check this tutorial.

In general I would make all the wires short just to reach the breadboard to reduce emission and collection of electric noise. There are documented issues with ESP reset line vulnerable to noise if connection is long.

Hope this will help and post your troubleshooting results :D

Krzysztof



Thanks for the reply Krzysztof! I will see the links you included and make the recommended adjustments. What value capacitor would you recommend?

For the record, I've experienced this problem using much shorter wires as well. The stack trace seems to indicate a memory issue. If there was a problem sustaining power, I would expect it to simply reset. Is that not right?
User avatar
By krzychb
#42121 I typically use >=100uF electrolytic + 100nF ceramic capacitors for decoupling and install them at VCC and GND pins of ESP module.

If for the same sketch you were getting exactly the same panic with short wires in bare bone configuration like here then I would rule out the problem with power.


Krzysztof