← index #8594Issue #8528
Related · high · value 0.650
QUERY · ISSUE

Enable factory reset boot mode without a user switch

openby cdwilsonopened 2022-04-29updated 2026-03-19
enhancement

The documentation at https://docs.micropython.org/en/latest/pyboard/general.html describes a "filesystem reset" boot mode which can be triggered by holding down the user switch during the power up boot sequence:

filesystem reset: resets the flash filesystem to its factory state, then boots in safe mode.

For supported MicroPython boards that do not have a user switch (e.g. SparkFun MicroMod STM32 Processor), is there any way to trigger a "filesystem reset" from software?

If not, would it be possible to add a new machine.factory_reset() function to enable this? (similar to the machine.reset() and machine.soft_reset() functions described in https://docs.micropython.org/en/latest/library/machine.html?highlight=reset#machine.reset)

For the sake of completeness, it would also be nice to support resetting into the "safe boot" boot mode from software as well through something like a machine.safe_reset() function.

CANDIDATE · ISSUE

Pyboard: Cannot use safe mode and factory reset

closedby IlysvlVEizbropened 2022-04-13updated 2022-08-25

@dpgeorge
Firmwares with this problem:
pybv11-thread-20210902-v1.17.dfu and any newer
( including latest pybv11-thread-20220413-unstable-v1.18-330-gd242a9b7f.dfu)

This problem only appears in firmwares with threading feature.

Reproducible steps:

  1. Hold down the USR switch.
  2. While still holding down USR, press and release the RST switch.
  3. Let go of the USR switch.

Specific phenomenon:

  1. The green LED always keeps on.
  2. PC cannot recognize pyboard.
  3. No py script is run.

Also see #7935 and #7816

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied