-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restart in bootmode via software not work when USB cable connected directly to PC #10204
Comments
|
Well, if it shouldn't be accessed directly then it should be a private method, that would be an improvement. And, if it doesn't work on all ESP32-S3s, would that be a bug? What would be the correct way to put the ESP32-S3 in download mode via software? |
Short answer. There is no software solution for bringing the S3 in download mode. |
Using |
What would you suggest as a hardware solution? Perhaps using a LATCH circuit connected to the BOOT pin? |
I tried this solution, unfortunately it didn't work for my case, maybe due to TinyUSB as you commented. |
That's unfortunate. For my use case (TinyUSB operating a CDC endpoint) I jumped through a number of hoops to get the download mode working and it's far from ideal since esptool.py requires two invocations (first triggers the download mode but times out waiting for the device readiness, second does the actual download). I'm investigating further how to avoid the double execution of esptool but it's a lower priority since it is working right now. Make sure you fully deinitialize the TinyUSB stack before you trigger the reboot. |
Thanks, any suggestion on how to fully deinitialize TinyUSB? |
if |
But somehow it worked, as I mentioned earlier, when ESP32-S3 is connected to a USB HUB, this method works perfectly but when ESP32-S3 is connected directly to the PC's USB port it really doesn't work. |
you said that it gave exception. Any chance you decode that backtrace with the ESP Exception Decoder? |
Sure, give me a couple o days and I will send you back. |
@me-no-dev sorry about the delay, I will probably do that on this week. Just wait a little bit more. |
Ok, below is the code with the backtrace and the decoder, unfortunately it was not able to provide very clear information about what happens. I run it on PlatformIO with
Any clue or suggestion? |
Board
ESP32-S3-WROOM-1-N16R8
Device Description
Plain module ESP32-S3-WROOM-1-N16R8 in a custom PCB.
Hardware Configuration
GPIO 19 and 20 are connected to a host USB (PC or USB HUB).
ESP32-S3 WROOM is power by a external source (not USB powered).
Version
Arduino v2.0.14 and v2.0.17
IDE Name
PlatformIO
Operating System
Windows 10
Flash frequency
40 Mhz
PSRAM enabled
yes
Upload speed
115200
Description
I am trying to restart the ESP32-S3 in download mode via a command in the firmware. I am using the internal PHY (pins 19 and 20) for CDC communication using the tinyUSB library through the 'USBCDC' class.
I am executing the following command and experiencing two different behaviors.
Sketch
Debug Message
Other Steps to Reproduce
To reproduce this issue you will need a USB HUB.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: