-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Serial1 not working with 3.1.2 and 3.1.3 #11076
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
I made some more tests with oscilloscope and could see that with 3.1.2 and 3.1.3 the RX signal from sensor is dead, like a pull-down, even I set it to input in the Setup section. With version 3.1.1 the RX signal is what the picture above shows. |
This is interesting. We have noticed some sort of issue moving from 3.1.1 to 3.1.2. |
@ricardourio - I have tested this sketch using an ESP32 devkit board and a USB-UART CH340 board to connect to pins 32 and 33. There were a few changes in IDF 5.4 and 5.3 that seem to have changed the way how UART internal pull ups are set. Therefore, as @Jason2866 pointed out, it seems to be related to lack of PULL UP in the RX Line. |
Closing since not reproducable. Hardware setup issue. |
Adding pinMode(33, INPUT_PULLUP) in the Setup section solved the issue, what probably 3.1.1 did before. |
Thanks for the feedback!
|
Honestly imho it is better as it is now. The internal pull up is very high (weak). By enabling it hides wrong hardware designs. Faster speeds longer wires (traces) will result in poor (ugly) signals. This is way more harder to find as when it just does not work completely. |
Jason2866, I'm working 28 years with electronics and I very rarely saw a pratical device working with active high RX, so for me automatic pull up makes more sense, and disabling it as an option. Maybe the resistor could have a important place when using long distance or high interference fields, but the picture only indicates that the sensor has no pull up circuit internally, and it need to be provided at processor side, what an ESP32 can do internally. The 1k resistor is a guarantee for interferences, but it depends on your ambient and impedances of your circuit. For now, I have more then 1000 devices sold, that I didn't need to install a resistor, working only with pull up, and as you can see in the picture, the impedance of signal is high enough to pull up handle it, as it can reach 3.3v and has a square wave appearance. |
My lesson learned in hardware and software development, never assume something. |
Good discussion and arguments. Thank you both for bringing it. I'll talk about it to the Arduino team. |
Board
ESP32-WROOM-32E
Device Description
It´s a development board using ESP32-WROOM-32E with 01 relay
Hardware Configuration
GPIO 32 and 33 are connected to a distance sensor (TOF) XKC-KL200 with serial output.
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
40 MHz
PSRAM enabled
no
Upload speed
1152000
Description
Compiling with 3.1.1 it works fine, but with 3.1.2 and 3.1.3 doesn´t give me any serial output at monitor. When running with WTD, I got a reset related to Core 0 WTD, that is running the serial1 reading instructions. The code doesn´t has a break from serial1 reading loop if no read, but works fine with sensor, unless version is 3.1.2 or greater.
Sketch
Debug Message
Other Steps to Reproduce
Communication output from sensor can be reproduced sending a message like the picture, every 100ms at 9600 8n1
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: