fix S3 cannot reset to bootrom with USB OTG due to new gpio deinit() #8880
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This PR fixes an issue when GPIO19/20 (USB D+/D-) pull-up is not enabled for usb jtag when we switch from OTG to Jtag when reset to bootrom. Making uploading via USB OTG not possible.
periman
abort the pinMode() and digitalWrite() on DP/DM which is required disconnect from USB bus and force PC host to re-enumerate USB OTG in bootrom.arduino-esp32/cores/esp32/esp32-hal-tinyusb.c
Lines 433 to 436 in fbfcb80
Notice
usb_switch_to_cdc_jtag(): reset_sem timeout
since bus reset never occurs. Device is clearing in bootrom (check with cp210x) but If you do lsusb it still show OTG USB with application VID/PID.Tests scenarios
Tested with esp32s3-devkitc-1 with (literally any S3 board). Steps to reproduce
Click upload, it will complain
Related links
Reported by Adafruit user
@ladyada