Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Esp32-s3 Upload and CDC over USB-OTG causes occasional COM port change? #11327

Unanswered
SaintSampo asked this question in Q&A
Discussion options

Hi folks,

I've watched the discussion surrounding ESP32-S3 code upload and CDC for awhile now. There have been a number of issues, but its looking like OTG is very close to being strictly better than Hardware CDC+JTAG.

The ideal features for ESP32 Arduino code upload:

  • no need to ever power cycle, reset, or put esp32 into boot mode
  • device can be uploaded to even in the event of any error like segfaults, pointer errors, ect
  • Serial debug (cdc) is possible at any time
  • device COM port and board file never changes

I use esp32-S3 for a robot control board. The board is largely use by high-school students new to programming. when I switched from ESP32 to esp32s3 for the system, it tripped a number of students up. My newer board has no USB-TTL chip.

For awhile, uploading was harder because you had to put the board in boot mode every time you wanted to upload. Today, my board files set by default:

  • USB CDC On Boot: "Enabled"
  • Upload Mode: "UART0 / Hardware CDC"
  • USB Mode: "Hardware CDC and JTAG"

With this configuration, most of the upload features are achieved, but in some cases, like if the program crashes, I have found the esp32 needs to manually be put into Boot mode to be "un-bricked" (have yet to find a consistent way to reproduce this).

With the latest changes to the Arduino IDE and ESP32 core, I was hoping switching to USB-OTG mode would fix the problem:

  • USB CDC On Boot: "Enabled"
  • Upload Mode: "USB OTG (TinyUSB)"
  • USB Mode: "USB OTG-CDC (TinyUSB)"

The good news is, this upload/CDC method seems to fix the above issue, but I encountered one more issue. During one of my tests, the device COM port changed(have yet to find a consistent way to reproduce this). This was easy for me to spot but could really throw off a student.

So before I did a bunch of testing and submitted an issue, I wanted to ask the community. Have you been in my shoes on this before? What is the best way right now you have found to upload to esp32s3?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.