Initial flash needed for download boot over internal USB?

Fundeckhermit
Posts: 7
Joined: Fri Apr 01, 2022 2:45 pm

Initial flash needed for download boot over internal USB?

Postby Fundeckhermit » Fri Apr 01, 2022 2:56 pm

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?

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

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

Postby ESP_Sprite » Fri Apr 01, 2022 2:58 pm

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.

Fundeckhermit
Posts: 7
Joined: Fri Apr 01, 2022 2:45 pm

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

Postby Fundeckhermit » Fri Apr 01, 2022 3:18 pm

So this would work?

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

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

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

Postby ESP_Sprite » Sat Apr 02, 2022 1:21 am

Yes, given that you put the chip into download mode by starting with GPIO0 low.

don.vukovic
Posts: 31
Joined: Tue Mar 21, 2017 3:40 am

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

Postby don.vukovic » Mon May 09, 2022 5:54 pm

Is there a page that describes this functionality ?

Are there example code available ?

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

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

Postby ESP_Sprite » Tue May 10, 2022 1:57 am

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.

Who is online

Users browsing this forum: No registered users and 152 guests