ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3

username
Posts: 532
Joined: Thu May 03, 2018 1:18 pm

ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3

Postby username » Fri Apr 14, 2023 8:02 pm

We are in the need to create a portable pocked programmer to flash units in the field.
We currently have one now that reads a firmware.bin file from a uSD card. But that uses the TX,RX, EN & IO0. to the other ESP32 device. Works fine, however we are changing all out product to use the newer ESP-S3, and would like to take advantage of the USB feature to flash it.

We just ordered the ESP32-S3-USB-OTG Dev Board for testing. But I was curious, has anyone done this already ? Or should I be asking can this be done. Seems the https://github.com/espressif/esp-dev-ki ... s3-usb-otg is very stale for anything USB.

username
Posts: 532
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3

Postby username » Mon Apr 24, 2023 6:56 pm

Making progress, but stuck on putting the device into programming mode via USB.

This is what I have so far. I have 2 ESP32-S3's connected together via a male to male USB cable.
One ESP32-S3 (aka Flasher) has a uSD connected, and can read the firmware.bin file stored on it.
The other ESP32-S3 (Unit to be programmed, AKA UTBP)

I have implemented all the USB stuff on the "Flasher" so it detects when the UTBP is plugged into it.
For testing that serial works, I have the UTBP just printing the time every second.

I can read the serial data coming from the UTBP on the Flasher just fine. So all the USB & serial connection stuff is working.

My present issue is how do I put the UTBP into programming mode via USB so I can send the data ?
Do I do this via toggling the cdc & dtr using this function (which are the last 2 parameters) ?
cdc_acm_host_set_control_line_state(cdc_dev, false, false));

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

Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3

Postby ESP_Sprite » Tue Apr 25, 2023 3:16 am

username wrote:
Mon Apr 24, 2023 6:56 pm
My present issue is how do I put the UTBP into programming mode via USB so I can send the data ?
Do I do this via toggling the cdc & dtr using this function (which are the last 2 parameters) ?
cdc_acm_host_set_control_line_state(cdc_dev, false, false));
Yes. Note that the DTR and RTS sequences are a bit different than the ones you'd use on an UART. The USB-JTAG-serial section of the technical reference manual has the details you need.

username
Posts: 532
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3

Postby username » Tue Apr 25, 2023 1:44 pm

Yes. Note that the DTR and RTS sequences are a bit different than the ones you'd use on an UART. The USB-JTAG-serial section of the technical reference manual has the details you need.
Thanks for the tip! That worked. Now onto trying to get https://github.com/espressif/esp-serial-flasher to work with it.

brasilrocks
Posts: 1
Joined: Fri Nov 10, 2023 2:10 pm

Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3

Postby brasilrocks » Sun Jan 28, 2024 8:39 pm

Did you connect D- and D+ lines directly from the flasher board to the D- and D+ lines of the UTBP?

Who is online

Users browsing this forum: Bing [Bot] and 98 guests