QT PY ESP32-S2 disconnects when using ESP-IDF but not Arduino

I am starting to play around with my QT PY ESP32-S2 board using PlatformIO. I have been able to get multiple “example” projects up and running using Arduino as my framework. However, when I try to get the “espidf hello world” example project using ESP-IDF as the framework, I can build/flash but when I reset the board to test the application, the board disconnects from my PC (no COM port available).

I am able to get the COM port back by putting the board into “manual bootloader” mode and reflash the working Arduino project just fine.

I also have tried erasing the entire flash before flashing the ESP-IDF application just to make sure the correct bootloader is being used.

I added

platform = espressif32
board = adafruit_qtpy_esp32s2
framework = espidf

to my platformio.ini file and made sure to use that environment with the pio run -e adafruit_qtpy_esp32s2 command.

I can only assume that I am not configuring my ESP-IDF projects correctly for this board/part combination. Does anyone have any experience with this board and ESP-IDF?

1 Like

Did you enable the USB-CDC option in the menuconfig? It might want to output it via serial UART otherwise.

@maxgerhardt Ahhh, that was it! Also after looking at some of the Arduino build idedata.json they explicitly set the ARDUINO_USB_CDC_ON_BOOT=1 config option.


Hey there, sorry for bumping this but I’m in a similar situation.

I have the Adafruit QT PY ESP32-S2 and after trying to upload a custom program (with the espressif framework) the board stops responding or accepting new uploads and I have to factory reset it.

Now, I tried finding the suggested “CONFIG_ESP_CONSOLE_UART” but can’t find it in the menuconfig:

Running menuconfig from the main windows cmd line and then “run -t menuconfig”. Any ideas?


It seems that the config location has changed, I assume due to the espressif32 v5 release. It’s now in Component config → ESP System Settings → Channel for console output