Page 1 of 1

ESP32-S2: USB bootloader?

Posted: Mon Mar 02, 2020 4:58 pm
by SomeCallMeTim
Hello -

I was reading the technical reference manual for the ESP32-S2, and noticed it refers to download boot mode via USB. Does this mean it's possible to load code onto a blank ESP32-S2 via USB?

Thanks,
Tim

Re: ESP32-S2: USB bootloader?

Posted: Tue Mar 03, 2020 12:25 am
by ESP_Angus
Hi Tim,

That's correct. The ESP32-S2 has a standard DFU bootloader and also can support the existing serial loader protocol over USB/serial (CDC device).


Angus

Re: ESP32-S2: USB bootloader?

Posted: Tue Mar 03, 2020 2:36 am
by SomeCallMeTim
Hi Angus -

That's great news! (In addition to the reference manual, I was speculating that CDC-ACM and DFU might've been in there based on the *_descriptors symbols exported.) Looking forward to trying out the ESP32-S2 at some point.

I looked around a bit in the esp-idf, and I didn't see any USB support yet in the SDK. Do you know the rough timeline for support? E.g. Along the lines of in a few weeks, a few months, or later this year?

Or can you invoke the ROM functions for this and get some CDC-ACM support? I see lots of USB related symbols inside the esp32s2.rom.ld file, although nothing inside the SDK invokes these yet. (Looking at the Uart_Init_USB function and its self documentation.)

Sounds like it might be the "Designware Controller" USB OTG IP based on the register names, and the symbols usb_dc_* within the bootloader's ROM code?

Thanks,
Tim

Re: ESP32-S2: USB bootloader?

Posted: Tue Mar 03, 2020 1:23 pm
by ESP_Sprite
The S2 ROM emulates a CDC-ACM, and there are hooks in the ROM code to allow use in ESP-IDF as well. On top of that, we are also going to add the TinyUSB stack to ESP-IDF, which supports a fair amount of standard USB interfaces plus the option to add your own. The controller indeed is a Designware one.