Search code examples
pythonraspberry-piraspberry-pi-zeroadafruit-circuitpython

Raspberry Pi Zero 2 W automatically disconnects after editing and saving new code in the `code.py` file


I have a question for you. Has anyone encountered an issue related to crashing and automatic disconnection of Raspberry Pi Zero 2 W when attempting to edit and save new code in the code.py file? I'm not sure what could be causing the problem, but it's preventing me from doing any work on the device.

After connecting the RPi via USB cable to the Mac and attempting to edit or save the code, the IDE freezes, and the cursor turns into a loading animation.
After a moment, I receive two messages and the device disconnects, requiring me to unplug and plug it back.

I've tested several different versions of CircuitPython (7.X, 8.X, 9.0), but the error persists regardless of the version.

Here's what I'm using:

  • MacOS (I also tested it on Win 11),
  • 32GB Kingston micro SD card,
  • IDE: Mu Editor (also tested with Thonny),
  • I upload CircuitPython to the memory card using Raspberry Pi Imager.

Does anyone have any ideas on how to fix this, or could it be a problem with a damaged RPi?


Solution

  • The CircuitPython broadcom port is very alpha. See https://github.com/adafruit/circuitpython/issues/8759 and related issues.