Skip to content

Commit a23277e

Browse files
projectgusdpgeorge
authored andcommitted
docs/esp32: Add a factory reset page.
This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent 9361a9f commit a23277e

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

docs/esp32/tutorial/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ to `<https://www.python.org>`__.
2121
intro.rst
2222
pwm.rst
2323
peripheral_access.rst
24+
reset.rst

docs/esp32/tutorial/intro.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ features, there are daily builds. If your board has SPIRAM support you can
5050
use either the standard firmware or the firmware with SPIRAM support, and in
5151
the latter case you will have access to more RAM for Python objects.
5252

53+
.. _esp32_flashing:
54+
5355
Deploying the firmware
5456
----------------------
5557

docs/esp32/tutorial/reset.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Factory reset
2+
=============
3+
4+
If something unexpected happens and your ESP32-based board no longer boots
5+
MicroPython, then you may have to factory reset it. For more details, see
6+
:ref:`soft_bricking`.
7+
8+
Factory resetting the MicroPython esp32 port involves fully erasing the flash
9+
and resetting the flash memory, so you will need to re-flash the MicroPython
10+
firmware afterwards and copy any Python files to the filesystem again.
11+
12+
1. You will need the Espressif `esptool`_ installed on your system. This is the
13+
same tool that you may have used to initially install MicroPython on your
14+
board (see :ref:`installation instructions <esp32_flashing>`).
15+
2. Find the serial port name of your board, and then use esptool to erase the
16+
entire flash contents::
17+
18+
esptool.py -p PORTNAME erase_flash
19+
20+
3. Use esptool to flash the MicroPython file to your board again. If needed,
21+
this file and flashing instructions can be found on the `MicroPython
22+
downloads page`_.
23+
24+
.. _esptool: https://github.com/espressif/esptool
25+
.. _MicroPython downloads page: https://micropython.org/download/?port=esp32

docs/reference/reset_boot.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ two processes:
244244
The specific process(es) are different on each port:
245245

246246
- :doc:`pyboard and stm32 port instructions </pyboard/tutorial/reset>`
247+
- :doc:`esp32 port instructions </esp32/tutorial/reset>`
247248
- :doc:`renesas-ra port instructions </renesas-ra/tutorial/reset>`
248249
- :doc:`rp2 port instructions </rp2/tutorial/reset>`
249250
- :doc:`wipy port instructions </wipy/tutorial/reset>`

0 commit comments

Comments
 (0)