-
Notifications
You must be signed in to change notification settings - Fork 1.3k
changing USB descriptors on ESP32S2 crashes #4746
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
Comments
It's not fixed, I have both error cases above do a reset loop on latest on ESP32-S2. |
I tested on the Metro ESP32-S2 with your examples and did not get a reset loop, hmm. I will test again. |
Oh it works (as in: drops to safe mode due to not enough endpoints) when I erase_flash and install with the Circuitpython bin, but crashes if I install the UF2 bootloader first and install with the UF2. |
I only tested with the .bin. I just re-tested and it goes into safe mode with import usb_cdc
usb_cdc.enable(console=True, data=True) If boot.py is empty and you use the UF2 version does it work? Could you compare the initial prompt with the version number between the .bin. and the .uf2 version to make sure they are the same build? Thanks. There isn't anything in my USB impl that should care whether it's UF2 or .bin. |
I tried with the artifacts, with the the latest S3, I fixed my toolchain to be able to build locally, same result every time. I tried the bin from the same local build, goes to safe mode. Empty boot.py, no boot.py, or the boot.py listed above to work do work as expected. |
See #4766 for problem diagnosis. |
I'm still having this problem. On an ESP32S2 MagTag 2.9", I do the following:
and I get a fresh CP7 install. I then create the following # boot.py
import usb_midi
usb_midi.disable()
print("disable MIDI")
import usb_hid
usb_hid.disable()
print("disable HID") Reset the board and the above works. I see those print statements in # boot.py
import usb_midi
usb_midi.disable()
print("disable MIDI")
import usb_hid
usb_hid.disable()
print("disable HID")
import usb_cdc
usb_cdc.enable(console=True, data=True)
print("enable CDC console & data") Upon reset, the board appears dead and no USB device appears in the USB devices list. Upon first reset, the D4 LED of the MagTag flashes yellow four times (and then maybe briefly blue?). The only recourse is to repeat the |
I was able to reproduce with the Magtag (
The Feather S2 in the same conditions reboots into safe mode (with the second
|
@todbot please open a new issue. Closed issues are hard to track and I suspect this might be a different problem from the original. (My guess is that the safe mode restart isn't working.) |
Tested on the Feather S2. I expected that trying to use more endpoints than available results in reset to safe mode. Here are a few
boot.py
that cause issues. (Manual safe mode recovers).Those work as expected:
The text was updated successfully, but these errors were encountered: