docs/pyboard/tutorial/reset.rst
If something goes wrong with your pyboard, don't panic! It is almost impossible for you to break the pyboard by programming the wrong thing.
The first thing to try is to enter safe mode: this temporarily skips
execution of boot.py and main.py and gives default USB settings.
If you have problems with the filesystem you can do a factory reset, which restores the filesystem to its original state.
For more information, see :doc:/reference/reset_boot.
To enter safe mode, do the following steps:
In safe mode, the boot.py and main.py files are not executed, and so
the pyboard boots up with default settings. This means you now have access
to the filesystem (the USB drive should appear), and you can edit boot.py
and main.py to fix any problems.
Entering safe mode is temporary, and does not make any changes to the files on the pyboard.
If you pyboard's filesystem gets corrupted (for example, you forgot to
eject/unmount it), or you have some code in boot.py or main.py which
you can't escape from, then you can reset the filesystem.
Resetting the filesystem deletes all files on the internal pyboard storage
(not the SD card), and restores the files boot.py, main.py, README.txt
and pybcdc.inf back to their original state.
To do a factory reset of the filesystem you follow a similar procedure as you did to enter safe mode, but release USR on green+orange: