-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
ESP32-C6 USB Serial (CDC) not working correctly (IDFGH-10698) #11924
Comments
I also tried compiling the
|
I was able to get the
The UART port still shows logs however:
Furthermore, the ot-cli sample still prints garbage with this fix. So it has to be something related to the ot-cli sample. |
Hi @thedevleon, ot_cli example doesn't support USB_SERIAL_JTAG peripheral as console, please see the recent discussion in #11896 (comment). Thank you for reporting the compilation failure for |
I see, thanks. Can you point out to me on how I might be able to add USB_SERIAL_JTAG support for the ot-cli example? I guess in |
Also, it seems the UART port is still used for bootloader output. I remember seeing that there are eFuses to burn to disable this output, but I can't find the documentation for it. Can you link me to this? Also, can I use the pins for UART as soon as the bootloader is finished writing output? Or does the output need to be disabled via the eFuses so that those pins are freed up for other uses? |
@chshu could you please help with this question?
This should probably be However, the simpler option might to use a different UART TX pin for communicating with your external device. Since UART pins can be freely configured, you can pass a different TX GPIO number when initializing the UART driver in your app after the boot process is finished. This way you will still be able to access UART logs (just in case) but the UART TX line going to the external device will not be disturbed by the boot process. |
@thedevleon Could you apply this patch: ot_cli_usb.patch, by excuting We will merge the change to esp-idf soon. |
Thank you so much for the patch, it can confirm that it works on my side. |
Answers checklist.
IDF version.
release/v5.1
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
ESP32-C6-DevKitC-1-N8
Power Supply used.
USB
What is the expected behavior?
I am compiling the openthread cli sample (
/examples/openthread/ot_cli
), but instead of using the UART port, I want to use the native USB CDC serial port via the USB-port labeled USB. We want to build a product using the ESP32-C6 that will only require a single USB port for debugging and serial input/output.Following the documentation, I enabled the USB CDC Serial console by setting
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
.Everything compiles and flashes fine, and the output looks good initially. However, right after the cli task is started, the console is flooded with wierd characters.
Furthermore, if I connect via the UART port instead, I still get logging output (I would expect NO output at all), but I cannot enter any commands.
What is the actual behavior?
I would expect the CLI to work just like it does with the UART port, and I would expect the UART port not to send anything at all.
Steps to reproduce.
Debug Logs.
More Information.
I have tried compiling with the latest master branch, however the sample does no longer compile. I get the following error:
The text was updated successfully, but these errors were encountered: