-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
docs: Add reference for reset and boot sequence, document factory reset for esp32 & rp2. #15956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0e7c390
docs: Add a "Reset and Boot Sequence" reference page.
projectgus 9361a9f
docs/rp2: Add a small factory reset page.
projectgus a23277e
docs/esp32: Add a factory reset page.
projectgus c5d74fe
docs/library: Note link between machine.soft_reset() and sys.exit().
projectgus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ to `<https://www.python.org>`__. | |
intro.rst | ||
pwm.rst | ||
peripheral_access.rst | ||
reset.rst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Factory reset | ||
============= | ||
|
||
If something unexpected happens and your ESP32-based board no longer boots | ||
MicroPython, then you may have to factory reset it. For more details, see | ||
:ref:`soft_bricking`. | ||
|
||
Factory resetting the MicroPython esp32 port involves fully erasing the flash | ||
and resetting the flash memory, so you will need to re-flash the MicroPython | ||
firmware afterwards and copy any Python files to the filesystem again. | ||
|
||
1. You will need the Espressif `esptool`_ installed on your system. This is the | ||
same tool that you may have used to initially install MicroPython on your | ||
board (see :ref:`installation instructions <esp32_flashing>`). | ||
2. Find the serial port name of your board, and then use esptool to erase the | ||
entire flash contents:: | ||
|
||
esptool.py -p PORTNAME erase_flash | ||
|
||
3. Use esptool to flash the MicroPython file to your board again. If needed, | ||
this file and flashing instructions can be found on the `MicroPython | ||
projectgus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
downloads page`_. | ||
|
||
.. _esptool: https://github.com/espressif/esptool | ||
.. _MicroPython downloads page: https://micropython.org/download/?port=esp32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For most users these days the auto-detection of port works well - it's often only advanced users that have more than one com port on their computer at any one time. As such I'd remove the need to "find serial port name" as new users wont know how to do this.
If desired this could be split to show the basic
esptool.py erase_flash
first and then a short follow up paragraph on setting the port name as well if needed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tries to imagine a world where there aren't nine serial devices plugged into a computer at all times

😁 In all seriousness, I think I agree. However, I suggest I submit a separate PR for this that also changes it in the esp32 tutorial. Also there are the download page instructions, although I'm not sure where these are generated from - maybe damien has to make that change somewhere internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should be in the various
deploy.md
files (part of theboard.json
andboard.md
set of files).