Skip to content

Is it possible to switch the USB mode at runtime programmatically? #8277

@sblantipodi

Description

@sblantipodi

Board

Lolin ESP32-S3 mini

Device Description

ESP32-S3

Hardware Configuration

no gpio in use

Version

latest master (checkout manually)

IDE Name

CLION

Operating System

Windows 11

Flash frequency

80MHz

PSRAM enabled

yes

Upload speed

115200

Description

esptool.js does not work with TinyUSB devices like S2 and S3,
espressif/esptool-js#97
this means that you cannot flash this devices using a web tool when they are in TinyUSB mode.

as you can imagine TinyUSB is much better than CDC since CDC creates lags on S3, it consumes more memory and it's not as stable as TinyUSB.

is there a way to flash a CDC firmware using the esptool.js and then switch to TinyUSB at runtime using some lines of code inside our firmware?

Sketch

no sketch

Debug Message

no debug

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions