From 8431e9f43dd47ae6b84074af9606fe44b415dc91 Mon Sep 17 00:00:00 2001 From: linuswck Date: Wed, 20 Mar 2024 11:55:21 +0800 Subject: [PATCH] Update README --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 158426b..ebba7b7 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ gdb target/thumbv7em-none-eabihf/release/kirdy ``` ## Flashing -There are several options for flashing kirdy. DFU requires only a USB-C cable or RJ45 cable, whereas OpenOCD needs a JTAG/SWD adapter. +If the firmware to be flashed involves an update on the flash settings, it is required to erase the flash settings before flashing the new firmware to avoid unexpected hardware behavior. There are several options for flashing kirdy. DFU requires only a USB-C cable or RJ45 cable, whereas OpenOCD needs a JTAG/SWD adapter. ### dfu-util on Linux * Install the DFU USB tool (dfu-util). @@ -64,7 +64,12 @@ 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 +### OpenOCD +```shell +openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program target/thumbv7em-none-eabihf/debug/kirdy verify reset; exit" +``` + +## Erasing Flash Settings The flash settings are stored in the last flash sector(ID: 11) of bank 0 of stm32f405. You can erase it with JTAG/SWD adapter or by putting the device in Dfu mode. You may find it useful if you have set network settings incorrectly. With JTAG/SWD adapter connected, issue the following command: @@ -78,8 +83,3 @@ With STM32 in DFU Mode, connect the USB Type C cable and then issue the followin ``` dfu-util -a 0 -s 0x080E0000:leave -D erase_flash_settings.bin ``` - -### OpenOCD -```shell -openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program target/thumbv7em-none-eabihf/debug/kirdy verify reset; exit" -```