Skip to content
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

ESP32-C6 Feather crashes and goes into safe mode when connecting to USB web workflow #9599

Closed
BlitzCityDIY opened this issue Sep 5, 2024 · 2 comments · Fixed by #9616
Closed
Assignees
Milestone

Comments

@BlitzCityDIY
Copy link

CircuitPython version

Adafruit CircuitPython 9.1.3 on 2024-08-29; Adafruit Feather ESP32-C6 4MB Flash No PSRAM with ESP32C6

Code/REPL

import time
import board
import digitalio

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

while True:
    led.value = True
    time.sleep(0.5)
    led.value = False
    time.sleep(0.5)

Behavior

When running the blink code above, I try to initiate a connection with https://code-beta.circuitpython.org/ over USB. Once the board connects, the onboard LED stops blinking and I get this message in the serial console:

connected

soft reboot

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

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Unable to allocate to the heap.
Please file an issue with your program at github.com/adafruit/circuitpython/issues.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

Description

I came across this while testing fixes related to this issue. Mainly that when the board is running code that has a blocking time.sleep delay in the loop it seems to also block connecting to the web editor.

When I connected to the code editor after freshly installing CircuitPython, I was able to connect right away (running the default print("hello world"). After saving the blink code and then trying to reconnect to the editor, I hit the safe mode error. I've been able to repeat the safe mode error consistently.

Additional information

No response

@tannewt tannewt modified the milestones: 9.2.0, 9.1.x Sep 6, 2024
@tannewt tannewt self-assigned this Sep 11, 2024
@tannewt
Copy link
Member

tannewt commented Sep 11, 2024

This works ok for me with the latest main. Can you reproduce it with an absolute newest build?

@BlitzCityDIY
Copy link
Author

i just tested with absolute newest (Adafruit CircuitPython 9.2.0-alpha.2351-32-g28b593341c on 2024-09-11; Adafruit Feather ESP32-C6 4MB Flash No PSRAM with ESP32C6) and had the same safe mode error occur on https://code-beta.circuitpython.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants