-
Notifications
You must be signed in to change notification settings - Fork 13.3k
receiving Serial data crashes the ESP #3869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “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? Sign in to your account
Comments
Merged
I don't mean to rush anyone but could anyone please have a look ? At least try the sketch and confirm this is a bug. |
You may try #4536. |
Closing because #4328 is merged, and no feedback for many months. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please fill the info fields, it helps to get you faster support ;)
Basic Infos
I have a MT681 power meter with an IR output connected to the UART. The meter sends bursts of 500 bytes every 1200ms @9600bps. So one burst lasts about 500ms.
Hardware
Hardware: WemosD1 mini
Core Version: 2.4.0rc2
Description
When the RX bursts are present upon boot, the ESP fails to connect to wifi. It does connect eventually but it takes it a unpredictable amount of time, mostly about 10min.
Obviously the watchdog kicked in. There is some output:
Workaround:
Set UART mode to tx only, RXbuffersize =0. Wait for connect , then adjust the buffer size and the uart mode according to your needs.
Settings in IDE
Module: Wemos D1mini
Flash Size: 4MB
CPU Frequency: 80Mhz
Flash Mode: ?qio?
Flash Frequency: ?40Mhz?
Upload Using: SERIAL (tried OTA too)
Reset Method: power cycle
Sketch
The sketch makes the ESP send itself some bytes over the serial. RX1 sends to swapped RX0.
You need a wire between D4 (TX1) and D7 (swapped RX0) for this.
If the wire is present the watchdog will kick in.
If you remove the wire, the ESP will start.
Observation 1: yield(); while receiving helps a lot. But how can you yield() if you do not know when bytes are coming ?
Observation 2: If the size of the RX buffer is left at the default value, things don't work either.
Output:
edit 2017-12-22:
The text was updated successfully, but these errors were encountered: