From 8cd3f7072134698b32cf232c35819d94ee0311e6 Mon Sep 17 00:00:00 2001 From: linuswck Date: Thu, 7 Mar 2024 11:55:10 +0800 Subject: [PATCH] Add Instructions for Erasing Flash Settings --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 0603568..34de5e1 100644 --- a/README.md +++ b/README.md @@ -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"