1
0
Fork 0

Add Instructions for Erasing Flash Settings

This commit is contained in:
linuswck 2024-03-07 11:55:10 +08:00
parent b7231f48ff
commit 8cd3f70721
1 changed files with 9 additions and 0 deletions

View File

@ -64,6 +64,15 @@ On a Windows machine install [st.com](https://st.com) DfuSe USB device firmware
- remove jumper
- cycle power to leave DFU update mode
### Erasing Flash Settings
The flash settings are stored in the last flash sector(ID: 11) of bank 0 of stm32f405. With JTAG/SWD adapter connected, you can erase the flash settings without erasing the firmware with the following commands. You may find it useful if you have set the wrong IP settings.
With JTAG/SWD adapter connected, issue the following command:
```shell
openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "flash init; init; halt; flash erase_sector 0 11 last; reset; exit"
```
### OpenOCD
```shell
openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program target/thumbv7em-none-eabihf/debug/kirdy verify reset; exit"