ESP8266 Resetting ITSELF
Posted: Wed Jun 24, 2015 3:15 pm
I wish to capture asynchronous serial data by my ESP8266. I am using the Arduino IDE interrupt functions. I enter a while loop and rely on an interrupt from the incoming data to exit the loop. This way I get really accurate timing to see if I am receiving a 1 or a 0.
It works OK to a point. If the sketch spends too much time in the while loop (gaps in the data), the ESP apparently resets itself printing: " ets Jan 8 2013,rst cause:4, boot mode:(3,7) " plus a whole bunch of other stuff. Stuff that looks like the results of an AT-RST command.
You can see this by writing:
void setup(){
Serial.begin(115200); -- found this line is not even necessary as long as serial monitor is set to 115200 baud
while(1);
}
When you run this, you would expect the result to appear like a hung process with nothing printing to the serial monitor - but, every few seconds, it prints what I have indicated above, apparently going into the reset mode.
I also see this phenomenon by using the ESP as a client, connecting to a server and sending it data using WiFi.print("some string") commands.
If I do:
WiFi.print"abc");
WiFi.print("def");
all is OK. If I add a third statement:
WiFi.print("fgh");
maybe OK. But If I have a forth statement:
WiFi.print("ijk");
I always get the apparent reset and the sketch stops.
Can you tell me what is going on here and is there any way around it.
Thanks
It works OK to a point. If the sketch spends too much time in the while loop (gaps in the data), the ESP apparently resets itself printing: " ets Jan 8 2013,rst cause:4, boot mode:(3,7) " plus a whole bunch of other stuff. Stuff that looks like the results of an AT-RST command.
You can see this by writing:
void setup(){
Serial.begin(115200); -- found this line is not even necessary as long as serial monitor is set to 115200 baud
while(1);
}
When you run this, you would expect the result to appear like a hung process with nothing printing to the serial monitor - but, every few seconds, it prints what I have indicated above, apparently going into the reset mode.
I also see this phenomenon by using the ESP as a client, connecting to a server and sending it data using WiFi.print("some string") commands.
If I do:
WiFi.print"abc");
WiFi.print("def");
all is OK. If I add a third statement:
WiFi.print("fgh");
maybe OK. But If I have a forth statement:
WiFi.print("ijk");
I always get the apparent reset and the sketch stops.
Can you tell me what is going on here and is there any way around it.
Thanks