-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
invert status never reset on serial0 after having been set to invert once #9896
Comments
Yes, confirmed. Thank for the issue report, @mha1! |
About why Serial and Serial0 behave differently, I'll try to figure it out. |
@SuGlider any news? |
I'll work on it today. |
@mha1 - What is the Arduino Core version that you have used to detect that Serial0 can't invert / revert the RX/TX signals? |
framework-arduinoespressif32 @ 3.20011.230801 (2.0.11) |
Ok... There are a few bugs with Serial and 2.0.11. Please try 2.0.17 instead. The PR will fix it for 3.0.3 and I can apply it in the Arduino |
This explains why it works with Serial1 and not with Serial0. |
"Ok... There are a few bugs with Serial and 2.0.11. Please try 2.0.17 instead. You mean other bugs besides the invert one, aren't you? |
yes, correct. |
@mha1 - You can copy the HardSerial and HAL from https://github.com/espressif/arduino-esp32/blob/release/v2.x/cores/esp32/HardwareSerial.cpp After that, fix manually the Inversion... |
I'll also apply the same fix you have proposed into |
So it'll be a 2.0.18? |
I don't think so... New improvements can be done directly into ESP32 Arduino Therefore, users will be able to git clone/pull the 2.x core into their projects. |
@mha1 |
|
will try on 2.0.17 and report back |
The fix works on framework-arduinoespressif32 @ 3.20016.0 (2.0.16). I don't know how to switch to 2.0.17 on PlatformIO |
No problem, 2.0.16 is good enough. Thank you!! |
I'll also add a PR for 2.x branch. |
Now how do I make use of the fix in PlatformIO? |
Wait until 3.0.3 is released |
@SuGlider added a PR for 2.x branch. How can I make use of it? |
Yes, but it is necessary to clone the branch into a There are instructions in the Web. |
Board
esp32-s3-devkitc-1
Device Description
esp32-s3-devkitc-1
Hardware Configuration
Pin 3 (UART0 TX) and GND are connected to a logic analyzer.
Please refer to the test code below. Expected output is an alternating output of non-inverted and inverted serial signals.
For serial0 the logic analyzer trace shows
non-inverted, inverted, inverted, ...
which is wrong.running the test code on serial1 shows the expected behavior.
changing
arduino-esp32/cores/esp32/esp32-hal-uart.c
fixes the problem however it is unclear why the serial0 and serial1 behave differently.arduino-esp32/cores/esp32/esp32-hal-uart.c
Lines 517 to 520 in 99750cd
Version
latest master (checkout manually)
IDE Name
VSCode/platformio
Operating System
Windows 10
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
921600
Description
It should be possible to change serial transmission from non-inverted to inverted and back to non-inverted. This doesn't work on serial0. Please refer to the test code I attached.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: