r/esp32•
bvguy

ESP32-C3 Arduino USB defines

build_flags = 
    -std=gnu++2a
;   -D ARDUINO_USB_MODE=1
;   -D ARDUINO_HW_CDC_ON_BOOT=1
;   -D ARDUINO_USB_CDC_ON_BOOT=1
;   -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
;   -D USBCON

I had this stuff set in my platformio.ini for the ESP32-C3/Arduino on a super-mini-dev-board and learned a couple things.

  1. If the USB serial port is not open to a terminal, the ESP seems to be really sluggish.
  2. If the USB is not connected at all, and the board is powered via the 5V pin, the board doesn't work at all.

By remarking all those defines out, the problems went away. I'd have to turn them back on to see my serial logging again. I have another project using the same board, but powered via the 3V3 pin. I didn't notice any problems there. That is why this problem took me by surprise.

Posted Oct 6, 2024, 3:57 AM UTC

52

Comments aren't archived yet

This post had 2 comments on Reddit. Comments for this period haven't been loaded into the archive yet.