Skip to content

Commit f3eb9ea

Browse files
Merge branch 'adafruit:main' into seeduino-xiao-rp2040
2 parents 2e12956 + 38c3816 commit f3eb9ea

File tree

20 files changed

+218
-194
lines changed

20 files changed

+218
-194
lines changed

docs/design_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ For example, a user can then use ``deinit()```::
9999
import board
100100
import time
101101

102-
led = digitalio.DigitalInOut(board.D13)
102+
led = digitalio.DigitalInOut(board.LED)
103103
led.direction = digitalio.Direction.OUTPUT
104104

105105
for i in range(10):
@@ -119,7 +119,7 @@ Alternatively, using a ``with`` statement ensures that the hardware is deinitial
119119
import board
120120
import time
121121

122-
with digitalio.DigitalInOut(board.D13) as led:
122+
with digitalio.DigitalInOut(board.LED) as led:
123123
led.direction = digitalio.Direction.OUTPUT
124124

125125
for i in range(10):

docs/troubleshooting.rst

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,35 @@ If your host computer starts complaining that your ``CIRCUITPY`` drive is corrup
1111
or files cannot be overwritten or deleted, then you will have to erase it completely.
1212
When CircuitPython restarts it will create a fresh empty ``CIRCUITPY`` filesystem.
1313

14-
This often happens on Windows when the ``CIRCUITPY`` disk is not safely ejected
14+
Corruption often happens on Windows when the ``CIRCUITPY`` disk is not safely ejected
1515
before being reset by the button or being disconnected from USB. This can also
1616
happen on Linux and Mac OSX but it's less likely.
1717

1818
.. caution:: To erase and re-create ``CIRCUITPY`` (for example, to correct a corrupted filesystem),
1919
follow one of the procedures below. It's important to note that **any files stored on the**
20-
``CIRCUITPY`` **drive will be erased**.
20+
``CIRCUITPY`` **drive will be erased. Back up your code if possible before continuing!**
2121

22-
**For boards with** ``CIRCUITPY`` **stored on a separate SPI flash chip,
23-
such as Feather M0 Express, Metro M0 Express and Circuit Playground Express:**
22+
REPL Erase Method
23+
^^^^^^^^^^^^^^^^^
24+
This is the recommended method of erasing your board. If you are having trouble accessing the
25+
``CIRCUITPY`` drive or the REPL, consider first putting your board into
26+
`safe mode <https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#safe-mode-3105351-22>`_.
2427

28+
**To erase any board if you have access to the REPL:**
2529

26-
#. Download the appropriate flash .erase uf2 from `the Adafruit_SPIFlash repo <https://github.com/adafruit/Adafruit_SPIFlash/tree/master/examples/flash_erase_express>`_.
27-
#. Double-click the reset button.
28-
#. Copy the appropriate .uf2 to the xxxBOOT drive.
29-
#. The on-board NeoPixel will turn blue, indicating the erase has started.
30-
#. After about 15 seconds, the NexoPixel will start flashing green. If it flashes red, the erase failed.
31-
#. Double-click again and load the appropriate `CircuitPython .uf2 <https://github.com/adafruit/circuitpython/releases/latest>`_.
30+
#. Connect to the CircuitPython REPL using a terminal program.
31+
#. Type ``import storage`` into the REPL.
32+
#. Then, type ``storage.erase_filesystem()`` into the REPL.
33+
#. The ``CIRCUITPY`` drive will be erased and the board will restart with an empty ``CIRCUITPY`` drive.
3234

33-
**For boards without SPI flash, such as Feather M0 Proto, Gemma M0 and, Trinket M0:**
35+
Erase File Method
36+
^^^^^^^^^^^^^^^^^
37+
**If you do not have access to the REPL, you may still have options to erase your board.**
3438

35-
#. Download the appropriate erase .uf2 from `the Learn repo <https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/uf2_flash_erasers>`_.
36-
#. Double-click the reset button.
37-
#. Copy the appropriate .uf2 to the xxxBOOT drive.
38-
#. The boot LED will start pulsing again, and the xxxBOOT drive will appear again.
39-
#. Load the appropriate `CircuitPython .uf2 <https://github.com/adafruit/circuitpython/releases/latest>`_.
39+
The `Erase CIRCUITPY Without Access to the REPL <https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#erase-circuitpy-without-access-to-the-repl-3105309-32>`_
40+
section of the Troubleshooting page in the Welcome to CircuitPython guide covers the non-REPL
41+
erase process for various boards. Visit the guide, find the process that applies to your board,
42+
and follow the instructions to erase your board.
4043

4144
ValueError: Incompatible ``.mpy`` file.
4245
---------------------------------------

0 commit comments

Comments
 (0)