R
R
RubaXa2015-07-28 22:30:19
Arduino
RubaXa, 2015-07-28 22:30:19

ESP8266-01 + Arduino Mega keeps rebooting, can't fix it?

I have:
- Arduino Mega
- ESP8266-01
ESP8266-01 connected to mega via Serial2 (TX2-16, RX2-17), threw 3.3V on GH_PD, RST and VCC

Simple sketch
void setup() {
  Serial.begin(9600);
  Serial2.begin(115200); // esp
}

void loop() {
  while (Serial2.available()) {
    Serial.write(Serial2.read());
  }
  
  while (Serial.available()) {
    Serial2.write(Serial.read());
  }
}
Problem .
After starting, esp constantly writes that it is ready, as if “someone” sends at + rst, at commands it receives and sometimes even processes, but still reboots again after a short period.
What is it? And how to deal with it?
It looks like this:
video: recordit.co/8zlM7AaLJh
AT+GMR
AT+GMR

AT version:0.21.0.0
SDK version:0.9.5
Full log
rl�C�
Ai-Thinker Technology Co. Ltd.

ready

 ets Jan  8 2
 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�C�
Ai-Thinker Technology Co. Ltd.

ready
at


OK

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�C�
Ai-Thinker Technology Co. Ltd.

ready
at+gmr


ERROR

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�B�
Ai-Thinker Technology Co. Ltd.

ready
AT+GMR

AT version:0.21.0.0
SDK version:0.9.5

OK

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�B�
Ai-Thinker Technology Co. Ltd.

ready

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�C�
Ai-Thinker Technology Co. Ltd.

ready

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 tusl�B�
Ai-Thinker Technology Co. Ltd.

ready
AT+CWLAP


ERROR

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�C�
Ai-Thinker Technology Co. Ltd.

ready
AT+CWLAP

+CWLAP:(2,"beeline-routerE4A5AC",-88,"fc:75:16:e4:a5:ac",1)
+CWLAP:(4,"Smart_box-21",-74,"00:0e:8f:d3:ed:a4",1)
+CWLAP:(4,"onlime25",-81,":":o9eCU5b
"":":-f630cfCU,5
d9c),I21),e06Cr::Wl":"P":"
AT+GMR

AT version:0.21.0.0
SDK version:0.9.5

OK
AT


OK
ATE


ERROR
AT+GLSP


ERROR
AT+CWLAP


ERROR

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�C�
Ai-Thinker Technology Co. Ltd.

ready

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x40100000, len 816, room 16 
tail 0
chksum 0x8d
load 0x3ffe8000, len 788, room 8 
tail 12cl
88
suni  
 
 turl�C�
Ai-Thinker Technology Co. Ltd.

ready

и так далее

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Pukhov, 2015-07-29
@Neuroware

What for on RST to hang up 3.3? That's probably why it sucks. You can also restart esp with the AT command

K
kacang, 2015-07-30
@kacang

It looks like the food is running out. You can try adding a conder to the power line for the ESP. And I agree with VovVovich that it may not be enough to feed the mega from the leg.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question