Closed EmbeddedAlchemist closed 1 year ago
@Challenger-0
I tested the sketch you have provided using Win11 and the IDE 1.8.15
Selected USB Mode: "USB-OTG(TinyUSB)"
and USB CDC On Boot: "Disabled"
Flashed an ESP32-S3 board that has both ports, UART and USB.
I open the serial monitor to the UART Win COM port and I open another terminal (PuTTY) with the TinyUSB CDC COM Port. Whatever I type into the PuTTY shows up on the Serial Monitor and vice-versa.
Therefore, it seems to work correctly.
What is the issue you see there? How are you testing it?
@Challenger-0 I tested the sketch you have provided using Win11 and the IDE 1.8.15 Selected
USB Mode: "USB-OTG(TinyUSB)"
andUSB CDC On Boot: "Disabled"
Flashed an ESP32-S3 board that has both ports, UART and USB.I open the serial monitor to the UART Win COM port and I open another terminal (PuTTY) with the TinyUSB CDC COM Port. Whatever I type into the PuTTY shows up on the Serial Monitor and vice-versa.
Therefore, it seems to work correctly.
What is the issue you see there? How are you testing it?
@SuGlider
I tested using Win11, Arduino IDE 1.0.16 and 2.0.3, USB Mode: "USB-OTG(TinyUSB)"
and USB CDC On Boot: "Disabled"
Flashed MuseLab nanoESP32-S3 and YD-ESP32S3 that has both USB and UART ports.
The window on the left is TinyUSB CDC COM Port (COM30) and on the right is UART COM (COM21) port. When I type into COM30, everything can be transfer to COM21, but when I type into COM21, nothing appear at COM30
I send three messages This is Hardware Serial! Test1
This is Hardware Serial! Test2
This is Hardware Serial! Test3
to COM21, nothing appear at COM30, then I send three messages This is USBCDC Serial! Test1
This is USBCDC Serial! Test2
This is USBCDC Serial! Test3
to COM30, they are all show up COM21.
Please test using v2.0.6. USB has been under major development throughout the 2.0 series.
Please test using v2.0.6. USB has been under major development throughout the 2.0 series.
@lbernstone The test is carried out under the condition of v2.0.6
@Challenger-0
Maybe the issue is in the Serial Debug Assistant software when used with USB CDC.
As I said, using other terminal software such as Arduino IDE Serial Monitor or PuTTY, it works perfectly well, using Arduino Core 2.0.6. Could you please try using the setup as I described?
A simple test with USB CDC with a sketch, to read and echo back what has been just read, works using the Arduino IDE Serial Monitor. Therefore, this issue can't be reproduced.
This is the "Echo Back" simple test for UART or CDC:
// simple echo back using UART or CDC:
// IDE Setup:
// USB Mode: "USB-OTG(TinyUSB)"
// USB CDC On Boot: "Disabled" ==> it will work with UART (Serial = UART)
// USB CDC On Boot: "Enabled" ==> it will work with USB CDC (Serial = CDC)
// Open the Serial Monitor using the respective COM port for UART or for USB
// Type anything and see the result
void setup() {
Serial.begin(115200);
}
void loop() {
int data = Serial.read();
if (data > 0) {
Serial.printf("Byte Read: %d [CHAR:'%c']\n", data, data);
}
}
@SuGlider
It works well. Many thanks. I never noticed the issue is in the Serial Debug Assistant software
Board
ESP32S3 Dev Module
Device Description
ESP32S3 DevKitC
Hardware Configuration
USB Connected
Version
v2.0.6
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
240MHz(WiFi)
PSRAM enabled
yes
Upload speed
115200
Description
USBCDC can only receive but cannot send
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide