AnsweredAssumed Answered

Unable to write the binaries in to stm32f4 using st-link v2 programmer

Question asked by marri.krishna on Jan 19, 2016
Latest reply on Jan 21, 2016 by marri.krishna
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.
 

Outcomes