Skip to content

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

@BlitzCityDIY

Description

@BlitzCityDIY

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions