2016-01-18 09:36 PM
Unable to write the binaries in to stm32f4 mcu using st-link v2 programmer. I am using STM32F407VET MCU. When I programming the binaries into it, it shows fwrite fails.
How to unlock the flash of the STM32F4XX using software programming/ Hardware settings. The following error is occurring: sudo ./st-flash write main.bin 0x08000000 2016-01-19T11:01:37 INFO src/stlink-usb.c: -- exit_dfu_mode 2016-01-19T11:01:37 INFO src/stlink-common.c: Loading device parameters.... 2016-01-19T11:01:37 INFO src/stlink-common.c: Device connected is: F4 device, id 0x10016413 2016-01-19T11:01:37 INFO src/stlink-common.c: SRAM size: 0x30000 bytes (192 KiB), Flash: 0x800000 bytes (8192 KiB) in pages of 16384 bytes 2016-01-19T11:01:37 INFO src/stlink-common.c: Attempting to write 50040 (0xc378) bytes to stm32 address: 134217728 (0x8000000) EraseFlash - Sector:0x0 Size:0x4000 Flash page at addr: 0x08000000 erasedEraseFlash - Sector:0x1 Size:0x4000 Flash page at addr: 0x08004000 erasedEraseFlash - Sector:0x2 Size:0x4000 Flash page at addr: 0x08008000 erasedEraseFlash - Sector:0x3 Size:0x4000 Flash page at addr: 0x0800c000 erased 2016-01-19T11:01:37 INFO src/stlink-common.c: Finished erasing 4 pages of 16384 (0x4000) bytes 2016-01-19T11:01:37 INFO src/stlink-common.c: Starting Flash write for F2/F4/L4 2016-01-19T11:01:37 INFO src/stlink-common.c: Successfully loaded flash loader in sram enabling 32-bit flash writes size: 32768 size: 17272 2016-01-19T11:01:37 INFO src/stlink-common.c: Starting verification of write complete 2016-01-19T11:01:37 ERROR src/stlink-common.c: Verification of flash failed at offset: 0 stlink_fwrite_flash() == -1 thank you in advance. #stm32f4072016-01-19 10:01 AM
Understand that this is a third-party tool, you should probably check with the community/coders around it, although the developer probably doesn't want to personally trouble shoot everyone's problems.
Suggest you use the ST-LINK Utilities and confirm behaviour there, and make sure the firmware is up to date and supported by the tool you are using.2016-01-21 03:53 AM