Skip to content

Enabling both CDCs on ESP32S2 boot loops and prevents safe mode #4986

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

Closed
todbot opened this issue Jul 11, 2021 · 1 comment
Closed

Enabling both CDCs on ESP32S2 boot loops and prevents safe mode #4986

todbot opened this issue Jul 11, 2021 · 1 comment
Assignees
Labels
bug espressif applies to multiple Espressif chips supervisor
Milestone

Comments

@todbot
Copy link

todbot commented Jul 11, 2021

CircuitPython version

Adafruit CircuitPython 7.0.0-alpha.4-15-g22e8a5058 on 2021-07-11; Adafruit FunHouse with ESP32S2

Code/REPL

# 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")

Behavior

On reset or power up, board goes into boot loop. No way to escape it, without esptool.py --erase_flash.
On FunHouse, the dotstar LEDs briefly flash purple and the display briefly starts to show boot_out.txt contents, as seen in this video:
https://user-images.githubusercontent.com/274093/125208434-1eaad680-e247-11eb-96fd-d37b1286403d.mp4

Description

FunHouse CircuitPython installation was performed as described here.
Entire process to recreate bug:

  1. Install TinyUSB UF2 bootloader: esptool.py --port /dev/tty.usbmodem01 write_flash 0x0 funhouse_tinyuf2_combo.bin (from here)
  2. Double-click to UF2 bootloader, copy over latest FunHouse CP7 alpha UF2 from S3
  3. Create boot.py with above script
  4. Reset board, observe boot loop
  5. Can double-tap to get back to UF2 bootloader, but reinstalling CP still results in boot loop
  6. Only recourse is: esptool.py --port /dev/tty.usbmodem01 erase_flash and repeat from step (1)

Submitted as new bug from #4746 (comment)

Additional information

No response

@todbot todbot added the bug label Jul 11, 2021
@tannewt tannewt added espressif applies to multiple Espressif chips supervisor labels Jul 12, 2021
@tannewt tannewt added this to the 7.0.0 milestone Jul 12, 2021
@dhalbert dhalbert self-assigned this Jul 15, 2021
@dhalbert
Copy link
Collaborator

ESP32-S2 now properly goes into safe mode. This must have been fixed with one of @microdev1's ESP32-S2 mode fix PR's.

After pressing reset:

Adafruit CircuitPython 7.0.0-alpha.6-73-g064e08657 on 2021-08-17; Adafruit Metro ESP32S2 with ESP32S2
>>> 
soft reboot

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
USB devices need more endpoints than are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips supervisor
Projects
None yet
Development

No branches or pull requests

3 participants