ESP-IDF: ESP32S3 DFU when USB CDC is active

pseudogelb
Posts: 2
Joined: Tue May 02, 2023 8:42 am

ESP-IDF: ESP32S3 DFU when USB CDC is active

Postby pseudogelb » Sat Oct 28, 2023 10:59 am

I have some trouble to reflash the ESP32S3 after activating the USB-CDC (tinyUSB). So basically the only option at the moment is to press the button to go into the bootloader mode at startup to reflash the device.

Now assume I have the device connected to a SBC in the field and communication is only over USB-CDC, I cannot send someone to press the button for a DFU. One could do a custom bootloader to solve this problem, but i would like to use the standard idf tools provided and I think it should work. In the menuconfig there seems also to be the option to activate DFU/runtime DFU, might this be a solution? If so, are there any examples about that, I could not find one in the ESP-IDF Examples list.

For example for the Arduino IDE there this features seems to be available:

(https://espressif-docs.readthedocs-host ... flash.html)

I cannot find anything similar for the ESP-IDF, does anyone have a suggestion how this could be done?

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP-IDF: ESP32S3 DFU when USB CDC is active

Postby chegewara » Tue Mar 19, 2024 4:57 pm

On arduino, when you have enabled DFU option, additional endpoint with descriptor is added.
In esp-idf tinyUSB you have to do it exclusively.

DrMickeyLauer
Posts: 168
Joined: Sun May 22, 2022 2:42 pm

Re: ESP-IDF: ESP32S3 DFU when USB CDC is active

Postby DrMickeyLauer » Wed Apr 03, 2024 10:30 am

Why is that so? Does the Arduino framework come with a replacement of the USB stack or where is the additional flexibility coming from?

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP-IDF: ESP32S3 DFU when USB CDC is active

Postby chegewara » Wed Apr 03, 2024 12:30 pm

Its how USB library in arduino is prepared.
If you enable DFU then additional endpoint is added to your code.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 117 guests