Can I flash new firmware through ESP32 S3's "USB" connector?

ugobyte
Posts: 4
Joined: Tue Dec 19, 2023 12:33 am

Can I flash new firmware through ESP32 S3's "USB" connector?

Postby ugobyte » Tue Dec 19, 2023 12:57 am

Hello everyone,

The ESP32 S3 Dev kit has two micro USB connectors on it. One is labeled "UART" and the other is labeled "USB".
I can easily flash new firmware through the "UART" connector but not the "USB" connector. My ESP32 S3 is inside an enclosure, which means I can't reach the BOOT nor the RESET buttons.

Is it possible to flash a new firmware to the ESP32 S3 Dev kit through the "USB" connector?

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

Re: Can I flash new firmware through ESP32 S3's "USB" connector?

Postby ESP_Sprite » Wed Dec 20, 2023 7:09 am

Yes. Note that you may want to also build in something to force the ESP32-S3 into download mode, otherwise you can get into a situation (when e.g. firmware reconfigures the USB GPIOs) when you can't use USB to force the device into download mode anymore.


ugobyte
Posts: 4
Joined: Tue Dec 19, 2023 12:33 am

Re: Can I flash new firmware through ESP32 S3's "USB" connector?

Postby ugobyte » Mon Dec 25, 2023 7:08 pm

ESP_Sprite wrote:
Wed Dec 20, 2023 7:09 am
Yes. Note that you may want to also build in something to force the ESP32-S3 into download mode, otherwise you can get into a situation (when e.g. firmware reconfigures the USB GPIOs) when you can't use USB to force the device into download mode anymore.
Thanks. How do I force the ESP32-S3 into download mode?

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

Re: Can I flash new firmware through ESP32 S3's "USB" connector?

Postby ESP_Sprite » Tue Dec 26, 2023 9:07 am

ugobyte wrote:
Mon Dec 25, 2023 7:08 pm
Thanks. How do I force the ESP32-S3 into download mode?
It's in the datasheet (section 'strapping pins'), but the short and skinny is that if you pull GPIO0 low and reset the chip, it'll come up in download mode.

ugobyte
Posts: 4
Joined: Tue Dec 19, 2023 12:33 am

Re: Can I flash new firmware through ESP32 S3's "USB" connector?

Postby ugobyte » Tue Jan 16, 2024 3:15 am

ESP_Sprite wrote:
Tue Dec 26, 2023 9:07 am
ugobyte wrote:
Mon Dec 25, 2023 7:08 pm
Thanks. How do I force the ESP32-S3 into download mode?
It's in the datasheet (section 'strapping pins'), but the short and skinny is that if you pull GPIO0 low and reset the chip, it'll come up in download mode.
ok thanks

ugobyte
Posts: 4
Joined: Tue Dec 19, 2023 12:33 am

Re: Can I flash new firmware through ESP32 S3's "USB" connector?

Postby ugobyte » Wed Jan 17, 2024 1:31 am

ESP_Sprite wrote:
Tue Dec 26, 2023 9:07 am
ugobyte wrote:
Mon Dec 25, 2023 7:08 pm
Thanks. How do I force the ESP32-S3 into download mode?
It's in the datasheet (section 'strapping pins'), but the short and skinny is that if you pull GPIO0 low and reset the chip, it'll come up in download mode.
Mind you, I cannot physically reach the ESP32-S3, so I have to programmatically set GPIO0 to low. Won't resetting the the chip cause GPIO0 to return to its default state after chip reset?

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

Re: Can I flash new firmware through ESP32 S3's "USB" connector?

Postby ESP_Sprite » Wed Jan 17, 2024 6:07 am

ugobyte wrote:
Wed Jan 17, 2024 1:31 am
Mind you, I cannot physically reach the ESP32-S3, so I have to programmatically set GPIO0 to low. Won't resetting the the chip cause GPIO0 to return to its default state after chip reset?
Well, you have to understand that normally, you would not need GPIO0 as when everything functions normally, you can put the chip into download mode using the USB connection. You would need the button only in extraordinary circumstances, say when you have firmware that accidentally reconfigures the GPIO pins and then hangs. So even if you could set GPIO0 in software (which you can't for the reason you indicated, but there's other ways to get the chip into download mode from software), you can't get around the fact that there still can be situations where USB alone won't work and there is no running software to get you into download mode. Situations like that don't happen very often, I've got enough hardware where I never needed GPIO0 at all, but while unlikely it's not impossible to run into them.

Who is online

Users browsing this forum: No registered users and 51 guests