-
Notifications
You must be signed in to change notification settings - Fork 7.6k
ESP32S2 could not reassign Serial pins #9363
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
@dzungpv - The Lolin S2 Mini has an USB port in the board that is actually the USB OTG CDC peripheral. In order to use UART0, please use |
Are you using the Arduino IDE? |
It works fine with the Arduino IDE, but enabling "USB CDC on Boot" in the tools menu. If you need to use Arduino as IDF Component, please follow the instructions in #9326 (comment) |
So as you say I must enable USB CDC on Boot to use UART0 on the ESP32S2 with Arduino? I mean I can assign other pin for it? I use ESP IDF with Arduino component. |
No, ESP32-S2 Arduino has 2 possible configurations:
|
Yes, but my problem: could not re-assign UART0 Pin with Arduino, I test with Arduino and ESP IDF with Kaluga dev board and Lolin S2 mini. So it is impossible running 2 UART at same time, My previous design running ESP32 without any problem because it has three UART |
I try with this sample for UART0 https://github.com/ncmreynolds/ld2410/blob/main/examples/basicSensor/basicSensor.ino
|
Ok, the issue is about reassigning UART0 pins using Arduino Core 2.0.14. Could you please apply this PR or just replace all 4 files: I think that it will solve the issue. This shall be released soon within the Arduino Core 2.0.15. |
I will pull this branch and it will be OK: https://github.com/espressif/arduino-esp32/tree/release/v2.x |
@dzungpv - Please let me know if the code from |
It seem not working, I tested same code but with Serial1 it work but everytime I change to Serial (cdc not enable) it not work again, same pins, same code. You should retest the code on real device. |
@dzungpv - Issue confirmed. There is a problem with UART0 pin setup. I'll work on a PR and submit it by today. |
Closed by #9373 - ready for Core 2.0.15 release. |
Board
Lolin S2 Mini
Device Description
Lolin S2 Mini
Hardware Configuration
GPIO 9 and 11 as UART pins
Version
v2.0.14
IDE Name
Arduino, IDF 4.4.6
Operating System
Macos 13, Windows 10
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
115200
Description
I use Serial1.begin(9600, SERIAL_8E1, 11, 9) it work but not with
Serial.begin(9600, SERIAL_8E1, 11, 9)
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: