ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3
Posted: Fri Apr 14, 2023 8:02 pm
by username
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.
Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3
Posted: Mon Apr 24, 2023 6:56 pm
by username
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));
Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3
Posted: Tue Apr 25, 2023 3:16 am
by ESP_Sprite
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.
Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3
Posted: Tue Apr 25, 2023 1:44 pm
by username
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.
Re: ESP32-S3-USB-OTG Dev Board to Flash another ESP32-S3
Posted: Sun Jan 28, 2024 8:39 pm
by brasilrocks
Did you connect D- and D+ lines directly from the flasher board to the D- and D+ lines of the UTBP?