ESP8266 stuck on reset loop #1671

Closed
ranjit84 opened this Issue Feb 23, 2016 · 12 comments

Projects

None yet

5 participants

@ranjit84
ranjit84 commented Feb 23, 2016 edited

Hi,

I am trying to upload new sketch using ESP8266 board manager, I use blink example and code works,i can see inbuilt blue led of esp blinking without reset on serial monitor.

But when i add Serial.begin or try to upload WifiServer sketch, program uploads and get stuck on reset
ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld

Can anyone please help me on this.

Basic Infos

Hardware: ESP-01
Core Version: 2

Module: Generic ESP8266 Module
Flash Size: 1MB
CPU Frequency: 80Mhz
Flash Mode: dio

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ikbelkirasan

First, make sure GPIO0 and GPIO2 are pulled high.

@ranjit84

I have

VCC + RST +CHPD - 3.3V ( all connected to 3.3V)
GPIO0 + GPIO2 - 3.3 V
Rx - Tx ( FTDI )
Tx - Rx (FTDI)
GND - GND

I have used separate power supply with 10 and 100 uF capacitors on Power and Gnd
To upload I put Gnd to GPIO0

This is my connection till now, I have tried replace power supply
Nothing seems to work

I have Arduino 1.6.5
with ESP8266 board - vers - 2
I am trying different setting to upload and upload is succesful all the time
I even tried blinking with GPIO2 pin and it worked with an led
WifiWebServer example is still stuck on reset.

@ikbelkirasan

Your setup looks good, maybe you need to reset the module after the uploading is successful? Don't forget to pull GPIO0 and GPIO2 high after the uploading is finished.

@igrr
Member
igrr commented Feb 27, 2016

Also please run CheckFlashConfig example and verify that your flash chip is indeed 1Mb.

@ranjit84

I have checked my connections and still same error.
ets Jan 8 2013,rst cause:4, boot mode:(3,7)

I have observed few things here -

a) ESP is very sensitive to power. I tried to upload sketches using nodemcu and esplorer, they have worked. While uploading the nodemcu firmware, power from FTDI chip was sufficient, but when I was trying to upload the sketch using esplorer with FTDI, it was not working. After I gave power to ESP with separate power supply and made common ground from FTDI and other power supply, then I only I could upload the sketch and I tried this separate power supply with Arduino IDE and ESP Board, it is still not working. When I work with separate power supply and FTDI serial comm,I have to connect Ground from FTDI with the ground of separate power supply.
And with nodemcu,baud rate that worked for me was 9600. it was causing giving error on uploading this firmware at 115200 baud rate.

b) Blinking sketch is working with Arduino IDE and Serial.Begin() is not, I have uploaded blinking sketch and it works without resets, but as soon as I add Serial.begin(115200) it is stuck on reset loop.

c) I can not make CheckFlashConfig this example work because it has serial printing that is not working. I have tried with configurations. Is there anyother way to check flash chip configuration may be I need to read chip number written on eeprom chip on esp.

@ranjit84

After changing Flash size to 512K (64K SPIFF),upload is success but after reset this is error on serial port -

ets Jan 8 2013,rst cause:4, boot mode:(3,7)
wdt reset
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld
system param error
56 45 52 31 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff....

And now I am trying with different flash memory, others config are not giving this parse error but they get stuck
I have removed all serial print code from CheckFlashConfg sketch, it is still stuck

I will try with 9600 baud rate too now.

@igrr
Member
igrr commented Feb 29, 2016

Looks like you need to erase flash completely and then try CheckFlashConfig with 512K option selected.

To erase the flash, you can use esptool (the same one which is used by Arduino to upload the sketch).
Run it like this: esptool -cp <port name> -cd ck -ce. Make sure the ESP is in bootloader mode before running this command (if you are triggering it manually).

@ranjit84

thanks,I will try this and about bootloading mode - ESP8266 - 01

UART Download Mode (Programming) GPIO0- 0 GPIO2 - 1
Flash Startup (Normal) GPIO0- 1 GPIO2- 1

Do I have to try it on Programming mode?
I have checkd my circuit it behaves same no matter GPIO2 is 0 or 1.

@tablatronix

What do those switches do, i have been using
esptool.py -p port erase_flash

@igrr
Member
igrr commented Mar 16, 2016

I meant to use esptool, not esptool.py. However you may use esptool.py to do the same if you have it installed.

@heroseller17

Hello i have problem with esp
when i want to switch relay esp resets!and its randomly but most of the time and i have this in serial port:
ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
~ld

i use arduino IDE for esp8266 programing .and i have esp-07
i have clear power supply with 1000uf || 100nf near the esp.
why it happens?

2-how many times esp could reset?
it means that it resets many times....could any problem happend because of this resets ?
for example in real time application for about 5 years esp resets about 100000 times...is it dangerous?

@igrr igrr closed this Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment