-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP8266 improving code to avoid crashes #2929
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? No Sign in to your account
Comments
Hi, kaczy1217, |
Hi, I am getting such kind of problem: wdt reset after first run. I do not know how to fix it. please kindly help. |
Hi.
I've been having similar kind of problems. I've changed the power supply
and that solved my troubles with esp.
I've added two capacitors on the 5v input and two on the 3.3v output of the
voltage regulator on my wemos d1 mini board.
One ceramic 100nF capacitor and one electrolytic 470uF as close to the
regulator as you can. Trust me capacitors are very important and of course
stable power supply.
05.11.2017 02:15 "Sovatna" <notifications@github.com> napisał(a):
… Hi,
I am getting such kind of problem:
ets Jan 8 2013,rst cause:4, boot mode:(1,7)
wdt reset
after first run. I do not know how to fix it. please kindly help.
I am trying to obtain data from OpenWeather
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#2929 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVc_9DrI2Nc8v9esMVpYofoDFJMdtZvrks5szQxFgaJpZM4L3Tmt>
.
|
Hi, May you kindly show me the schematic of your connection? I am a bit young to this, please. |
I'm at the wedding party at the moment but I'll try to send you my
schematics in a few hours :-)
05.11.2017 02:31 "Sovatna" <notifications@github.com> napisał(a):
… Hi,
May you kindly show me the schematic of your connection? I am a bit young
to this, please.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#2929 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVc_9DKj11T5pe-B4CqG606vpGIVbH9aks5szQ_lgaJpZM4L3Tmt>
.
|
Thank you so much for your kind. Enjoy your party! |
Hardware
Hardware: ESP-12E
Description
Hello to everyone. This is gonna be my first post on Github, but recently I'm reading your posts almost every single day for many hours.
I'm developing ESP-12E board. A SoftwareSerial to communicate with RFID reader and ESP acting as a Server and Client. If RFID antenna has a tag in range it sends ID via my SoftwareSerial to ESP with 1s intervals. When a tag is not present near the antenna it sends nothing.
Basically my program checks the availability RFID and when it notices change of the tag value from 0 to 'something' or from 'something' to 0 it sends it only once in a message to the master unit.
If RFID doesn't send anything during 2500ms program founds it that the tag is not present in the range of reader.
Master unit occassionally checks if the slave has 'something' in its range by sending message with "U" letter. Slave is responding with its current status.
I have the ESP-12E adapter board with 3V3 stabilizer. Everything is soldered and secured with ceramic 100nF decoupling condensator, and two 470uF electrolytic condensators: one before and one behind the 3V3 stabilizer. Everything is powered from 5V 6A supply. CH_E and RST pulled up to 3V3. GPIO0 and GPIO2 pulled up to 3V3, GPIO15 pulled to GND.
I would like my ESP work for a weeks without problems, but I know that is hard to achieve. I'm ok with occassionally resets but I wouldn't be pleased with freezes. I rather would like the wdt to reset my chip than it crash or completely freeze.
Today I've tested it for a couple of hours and it worked well without any failures but I want to be better safe than sorry. I'm not sure if I haven't add too many yields or delay(0)s. I've added yields and delays because I've just wanted to give the processor time to handle system tasks but I didn't mean to unnecessarily feed the wdt. I want the wdt to eventually handle the heap and restart chip.
I would like you to see my code and help me if there is anything I can do to improve it (especially RFID reading part) to prevent from dead loops or mistakes that could cause a freeze?
And the second question: Is it ok to callback the WiFiSend function inside the if(!client) ?
I don't want you to write code for me. I'm just looking for good advices about yielding and wdt (examples are very welcome ;) ). I spent many hours searching the Internet for neccessary information but I didn't find too many concretes except generalities like:
Is Ticker a good solution for me?
Sorry for the code mistakes but I'm not a professional programist.
Settings in IDE
Module: Generic ESP8266 Module
Flash Size: 4MB/1MB
CPU Frequency: 80Mhz
Flash Frequency: 40Mhz
Upload Using: SERIAL
Reset Method: ck
The text was updated successfully, but these errors were encountered: