S2-Mini UART is dropping the first 129 bytes. #23156
-
To me this is very strange. I'm trying to figure out why my LD2402 driver is not working on an S2-Min. I think I've isolated all the variables. I've compiled code with the following lines:
I've created it for:
On the ESP8266:
On the ESP32:
Which are what I expect header section data footer section.
Only the last 12 bytes comes in. Consistently. I've used the same wires and sensor on the ESP32/ESP32S2 because I thought it might be a wiring issue. I've attached the sensor to three different S2-Mini boards. Soldered it a dozen times. I'm stumped, any ideas of how to track this down. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
@arendst Since this is device specific i fear this is an Arduino / IDF issue. I wonder why UART is affected. |
Beta Was this translation helpful? Give feedback.
-
I'll have as look using my Wemos S2 mini which BTW needs flow control (RTS/CTS) to communicate serial using the USB connector. |
Beta Was this translation helpful? Give feedback.
-
Here are the connections I thought maybe the USB connection was interfering with the uart so this is plugged into a charger not the computer.. |
Beta Was this translation helpful? Give feedback.
-
Thx. Current status: I verified with SerialBridge that the S2 (= single core) fails to receive full serial data when the message is larger than the S2 hardware serial receive buffer (128 bytes). It works fine on an ESP32 (= dual core) having the same size serial hardware receive buffer. I'll dive further into ArduinoEspressif framework and IDF to find where it fails. Nice exercise ;-) |
Beta Was this translation helpful? Give feedback.
-
Fixed with latest change fb6640b |
Beta Was this translation helpful? Give feedback.
-
After a successful header the code I'm using to get the rest of the line is:
when it fails it burbs out:
|
Beta Was this translation helpful? Give feedback.
Fixed with latest change fb6640b