QUERY · ISSUE
stm32: Factory reset from code
port-stm32
I believe factory reset should be available as an alternative to USR. USR might not be practical or accessible for custom boards or how the device might be enclosed or accessed.
This might also be related to ways to clear/format/erase the filesystem from code.
Basically recovery and housecleaning.
CANDIDATE · ISSUE
STM32: Can't Factory Reset
bugport-stm32
Expected Behavior:
- While Holding User Button
- Press Reset Button
- Release User Button after 3 flashes
- Devices echos back 3 flashes
- Files-system should be restored to default state.
?
Or am I misunderstanding how it's supposed to work?
I had to change this line:
https://github.com/micropython/micropython/blob/bffb71f523e4bcc21b913af291deeb67091bed88/ports/stm32/main.c#L534
to: mounted_flash = init_flash_fs(state.reset_mode);
... since https://github.com/micropython/micropython/blob/bffb71f523e4bcc21b913af291deeb67091bed88/ports/stm32/main.c#L475 only updates state.reset_mode not reset_mode.