ESP32-S2: USB bootloader?

SomeCallMeTim
Posts: 12
Joined: Fri Sep 01, 2017 3:50 pm

ESP32-S2: USB bootloader?

Postby SomeCallMeTim » Mon Mar 02, 2020 4:58 pm

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

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: ESP32-S2: USB bootloader?

Postby ESP_Angus » Tue Mar 03, 2020 12:25 am

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

SomeCallMeTim
Posts: 12
Joined: Fri Sep 01, 2017 3:50 pm

Re: ESP32-S2: USB bootloader?

Postby SomeCallMeTim » Tue Mar 03, 2020 2:36 am

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

ESP_Sprite
Posts: 9577
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S2: USB bootloader?

Postby ESP_Sprite » Tue Mar 03, 2020 1:23 pm

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.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 89 guests