BLACK STM32F407ZGT: factory resetting
-
- Posts: 12
- Joined: Wed Mar 20, 2019 11:25 am
BLACK STM32F407ZGT: factory resetting
I flashed a BLACK STM32F407ZGT using mcauser's github repo. After resetting the board while connected to the computer, it says main.py was corrupted. How to do a factory resetting on this board? There are instructions for the official pyboard. But it uses green and yellow LEDs to control the timing of releasing the reset button. It seems this method does not apply to BLACK STM32F407ZGT.
-
- Posts: 12
- Joined: Wed Mar 20, 2019 11:25 am
Re: BLACK STM32F407ZGT: factory resetting
Reflashed firmware and the problem is still there. I even executed some Arduino code to make sure micropython was wiped out before reflashing. Why?
Re: BLACK STM32F407ZGT: factory resetting
To factory reset the filesystem: holding down hte USR button after reset, it cycles through four stages. If you have a single LED then it flashes the number of times to indicate which stage. If you release USR in stage 3 it will reset the filesystem.
-
- Posts: 12
- Joined: Wed Mar 20, 2019 11:25 am
Re: BLACK STM32F407ZGT: factory resetting
@jimmo Thank you for your help. Using button K1 and RST, the board was reset successfully. I still got two questions regarding the file system:
1. Why reflashing micropython doesn't erase the corrupted file system.
2. Arduino code is burned using stlink, while micropython using dfu. Are codes flashed into different memory locations with these two methods?
1. Why reflashing micropython doesn't erase the corrupted file system.
2. Arduino code is burned using stlink, while micropython using dfu. Are codes flashed into different memory locations with these two methods?
Re: BLACK STM32F407ZGT: factory resetting
The flashing process only writes the areas where it needs to. You can optionally do a full erase during flashing if you want. (Mass erase, as opposed to the page-erase that the flash process does).
MicroPython keeps the code and filesystem in separate areas of flash, so flashing code will not overwrite the filesystem. This is actually really handy while doing MicroPython firmware development, not having to re-upload test code and libraries every time.
If your Arduino sketch was small it likely only wrote a small section of flash, leaving everything else intact.
MicroPython keeps the code and filesystem in separate areas of flash, so flashing code will not overwrite the filesystem. This is actually really handy while doing MicroPython firmware development, not having to re-upload test code and libraries every time.
If your Arduino sketch was small it likely only wrote a small section of flash, leaving everything else intact.
-
- Posts: 12
- Joined: Wed Mar 20, 2019 11:25 am
Re: BLACK STM32F407ZGT: factory resetting
Thanks again for the clarification.
Re: BLACK STM32F407ZGT: factory resetting
Is it possible to trigger the filesystem reset from the REPL?