Good afternoon,
I am working with an Esp32S3 chip. In order to flash a firmware in the chip, I ma using the following commande line (esptool) :
python -m esptool -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 80m --flash_size 8MB 0x0 FS22Merged.bin
My Esp32S3 is connected to the PC USB port using an USB cable.
I would like to increase the transfert speed when flashing my firmware.
For that, I have tried the options :
-b 460800
-b 921600
-b 1500000
-b 2000000
but the transfert speed is still the same.
Using the same firmware file for each test, the transfert time is always 26s.
Do you know if there is a way to increase the transfert speed of my firmware ?
Thank you for your help,
best regards
Thomas TRUILHE
Esp32S3 : Is there a way to increase the flash speed using esptool commande ?
-
ThomasESP32
- Posts: 281
- Joined: Thu Jul 14, 2022 5:15 am
-
lbernstone
- Posts: 1131
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Esp32S3 : Is there a way to increase the flash speed using esptool commande ?
If you are transferring over usb-cdc (a single port on the device, or else the port labelled USB rather than COM/UART), then you are limited to USB 1.1 speeds. USB-CDC speed is not controlled by esptool, and the max you will get is about 500KB/s. If the transfer is slower than that (using usb-cdc), then the problem is likely in the usb cable, or possibly in the port you are using.
-
ThomasESP32
- Posts: 281
- Joined: Thu Jul 14, 2022 5:15 am
Re: Esp32S3 : Is there a way to increase the flash speed using esptool commande ?
I am not working on a Development Board but on a custom design board.
How can I know I am using the usb cdc or not ? All that I know is that the USB pin (USB_D- and USB_D+) from the Esp32S3
are going to a ESDALD05UD4X WEEN chip, then on a USB-C connector ...
Could you please help me to understand ?
Thank you
How can I know I am using the usb cdc or not ? All that I know is that the USB pin (USB_D- and USB_D+) from the Esp32S3
are going to a ESDALD05UD4X WEEN chip, then on a USB-C connector ...
Could you please help me to understand ?
Thank you
-
lbernstone
- Posts: 1131
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Esp32S3 : Is there a way to increase the flash speed using esptool commande ?
Esptool can program the ESP32-S3 in 3 ways
1) UART - You connect to the TX0/RX0 at a set baud rate. This requires an adapter chip, so production boards generally don't have them, but they are very useful for development.
2) USB-CDC - A serial tty run over USB 1.1. The protocol (USB1.1) defines a negotiated speed (12Mbps). All ESP32 variants, except the original, have a hardware level USB-CDC peripheral.
3) USB-DFU - Another USB based protocol more specifically designed for firmware uploads. This requires more setup, as it needs a full USB stack running (ESP-S & -P series). The ESP32-P4 can run USB 2.0 (480Mbps).
Note that the speed of the flash will be the bottleneck on the transfer rate as you start to get up to the MB/s rates.
1) UART - You connect to the TX0/RX0 at a set baud rate. This requires an adapter chip, so production boards generally don't have them, but they are very useful for development.
2) USB-CDC - A serial tty run over USB 1.1. The protocol (USB1.1) defines a negotiated speed (12Mbps). All ESP32 variants, except the original, have a hardware level USB-CDC peripheral.
3) USB-DFU - Another USB based protocol more specifically designed for firmware uploads. This requires more setup, as it needs a full USB stack running (ESP-S & -P series). The ESP32-P4 can run USB 2.0 (480Mbps).
Note that the speed of the flash will be the bottleneck on the transfer rate as you start to get up to the MB/s rates.
Re: Esp32S3 : Is there a way to increase the flash speed using esptool commande ?
Also note that at some point, the erase- and write-speed of the flash becomes a bottleneck.
-
ThomasESP32
- Posts: 281
- Joined: Thu Jul 14, 2022 5:15 am
Re: Esp32S3 : Is there a way to increase the flash speed using esptool commande ?
So, as I understand, because I have no USB to UART chip on my board,
I am using USB-CDC and it is not possible to increase the flash speed is it correct ?
Concerning the solution USB-DFU, because the Esp32S3 on the board has no particular bootloader or USB stack,
I can't use USB-DFU. Is it correct too ?
I am using USB-CDC and it is not possible to increase the flash speed is it correct ?
Concerning the solution USB-DFU, because the Esp32S3 on the board has no particular bootloader or USB stack,
I can't use USB-DFU. Is it correct too ?
Re: Esp32S3 : Is there a way to increase the flash speed using esptool commande ?
https://github.com/espressif/esptool/re ... tag/v5.2.0 comes with the new fast-reflashing feature. We will prepare an article for https://developer.espressif.com/ soon after we finish the ESP-IDF integration (will be in ESP-IDF v6.1 but new esptool can be used as standalone tool for older ESP-IDF versions as well.).
Who is online
Users browsing this forum: PerplexityBot, PetalBot and 4 guests
