Page 1 of 1

Initial flash needed for download boot over internal USB?

Posted: Fri Apr 01, 2022 2:56 pm
by Fundeckhermit
I want to design a minimal PCB around the ESP32-S2-MINI with just:
  • Crystal circuit
  • Boot/Reset button
  • USB connector directly on D+ and D-
  • Voltage regulator
Can I use IDF to download a fresh/new/empty ESP32-S2-MINI with just the internal USB?

OR do I need JTAG/UART for the initial flashing?

Re: Initial flash needed for download boot over internal USB?

Posted: Fri Apr 01, 2022 2:58 pm
by ESP_Sprite
Yes, you can; the ROM contains a driver that can flash the device over USB. You do need a way to be able to put it into download mode by grounding GPIO0, though.

Re: Initial flash needed for download boot over internal USB?

Posted: Fri Apr 01, 2022 3:18 pm
by Fundeckhermit
So this would work?

Flashing a binary file with IDF on a new/fresh/empty ESP32-S2 over the internal USB (USB-OTG) peripheral.

Re: Initial flash needed for download boot over internal USB?

Posted: Sat Apr 02, 2022 1:21 am
by ESP_Sprite
Yes, given that you put the chip into download mode by starting with GPIO0 low.

Re: Initial flash needed for download boot over internal USB?

Posted: Mon May 09, 2022 5:54 pm
by don.vukovic
Is there a page that describes this functionality ?

Are there example code available ?

Re: Initial flash needed for download boot over internal USB?

Posted: Tue May 10, 2022 1:57 am
by ESP_Sprite
I'm not sure if there's a page describing this aside from mentions that you can also flash over USB here and there.What code example would you need? The USB port exposes an industry-standard CDC-ACM serial port (over which you can use the same protocol as when you use UART) and DFU endpoints.