diff --git a/wled00/wled.cpp b/wled00/wled.cpp index be897d3c00..b2dcc3f3da 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -451,6 +451,10 @@ void WLED::setup() if (!Serial) delay(2500); // WLEDMM allow CDC USB serial to initialise #endif #if ARDUINO_USB_CDC_ON_BOOT || ARDUINO_USB_MODE + #if ARDUINO_USB_CDC_ON_BOOT && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) + // WLEDMM avoid "hung devices" when USB_CDC is enabled; see https://github.com/espressif/arduino-esp32/issues/9043 + Serial.setTxTimeoutMs(0); // potential side-effect: incomplete debug output, with missing characters whenever TX buffer is full. + #endif if (!Serial) delay(2500); // WLEDMM: always allow CDC USB serial to initialise if (Serial) Serial.println("wait 1"); // waiting a bit longer ensures that a debug messages are shown in serial monitor if (!Serial) delay(2500);