CircuitPython how to: Erase and re-create the CIRCUITPY filesystem

In CircuitPython, calling storage.erase_filesystem() will erase and re-create the CIRCUITPY filesystem.

On boards that present USB-visible CIRCUITPY drive (e.g., SAMD21 and SAMD51), then call microcontroller.reset() to restart CircuitPython and have the host computer remount CIRCUITPY.

This function can be called from the REPL when CIRCUITPY has become corrupted.

Warning

All the data on CIRCUITPY will be lost, and CircuitPython will restart on certain boards.

Just enter in REPL:

import storage
storage.erase_filesystem()
Then, Use Stop/Restart to reconnect.


Comments

Popular posts from this blog

480x320 TFT/ILI9488 SPI wih EP32C3 (arduino-esp32) using Arduino_GFX Library

my dev.tools - FNIRSI 2C23T 3-in-1 Dual Channel Oscilloscope/Multimeter/Signal Generator