ESP32-C3 does not start with USB Serial console output enabled
Posted: Wed Nov 03, 2021 3:08 pm
Hello,
I'm working in an application in which I'd like to keep UART0 free to communicate with another device, so I don't want to print console output in this port.
Also, I'd like to have console output for debuging purposes in USB Serial/JTAG Controller. However, when I enable the option "Channel for console output" in menuconfig, the device seems to be stalled until I open the virtual serial port. When the port is opened, the device runs normally and prints to the USB virtual serial console.
This problem only occurs when setting "USB Serial/JTAG Controller" in "Channel for console output". Setting any other option, no problem occurs ("Default: UART0", "Custom UART" or "None").
In the USB Serial/JTAG Controller Console documentation page, at the "Limitations" section (https://docs.espressif.com/projects/esp ... light=jtag), it says something that ESP32-C3 chip would stall if it receives bytes that are not read. But it do not mention what would happen if the application is trying to write console output to USB port when there is no other device attached to it.
Is this a normal behavior, or I may be missing something?
As a workaroud, I redirected my debuging console output to a Custom UART because I have some spare gpios. However I'd like to understand why USB issue ie happening.
Thank you.
Yuri
I'm working in an application in which I'd like to keep UART0 free to communicate with another device, so I don't want to print console output in this port.
Also, I'd like to have console output for debuging purposes in USB Serial/JTAG Controller. However, when I enable the option "Channel for console output" in menuconfig, the device seems to be stalled until I open the virtual serial port. When the port is opened, the device runs normally and prints to the USB virtual serial console.
This problem only occurs when setting "USB Serial/JTAG Controller" in "Channel for console output". Setting any other option, no problem occurs ("Default: UART0", "Custom UART" or "None").
In the USB Serial/JTAG Controller Console documentation page, at the "Limitations" section (https://docs.espressif.com/projects/esp ... light=jtag), it says something that ESP32-C3 chip would stall if it receives bytes that are not read. But it do not mention what would happen if the application is trying to write console output to USB port when there is no other device attached to it.
Is this a normal behavior, or I may be missing something?
As a workaroud, I redirected my debuging console output to a Custom UART because I have some spare gpios. However I'd like to understand why USB issue ie happening.
Thank you.
Yuri