-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
- Programmer: Stlink/v2
- Operating system: Ubuntu 16.04
- Stlink tools git commit hash: 1969148
- Stlink commandline tool name:
st-flash - Target chip: STM32F051R8T6TR and STM32F030K6T6
Whenever I flash any of the F0 chips that I have, the flashing fails on the first execution. I have to reset the chip (power off and power back on again) and try to flash the chip again. On the second execution it successfully flashes the chip.
I have included the standard console output below. I am unable to include the debug output, because GitHub won't accept it - it is too long.
This seems to be related to issue #92, but it doesn't look as if simply running st-flash directly works on the first execution.
Initial flashing:
k@k-Desktop:~/FW$ st-flash write FUPS.bin 0x08000000
st-flash 1.4.0-13-g1969148
2018-01-10T11:44:05 INFO common.c: Loading device parameters....
2018-01-10T11:44:05 INFO common.c: Device connected is: F0 device, id 0x20006440
2018-01-10T11:44:05 INFO common.c: SRAM size: 0x2000 bytes (8 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
2018-01-10T11:44:05 INFO common.c: Attempting to write 35648 (0x8b40) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08008800 erased
2018-01-10T11:44:06 INFO common.c: Finished erasing 35 pages of 1024 (0x400) bytes
2018-01-10T11:44:06 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2018-01-10T11:44:06 INFO flash_loader.c: Successfully loaded flash loader in sram
35/35 pages written
2018-01-10T11:44:08 INFO common.c: Starting verification of write complete
2018-01-10T11:44:08 ERROR common.c: Verification of flash failed at offset: 0
stlink_fwrite_flash() == -1
After having reset the chip (power off and power back on):
k@k-Desktop:~/FW$ st-flash write FUPS.bin 0x08000000
st-flash 1.4.0-13-g1969148
2018-01-10T11:44:14 INFO common.c: Loading device parameters....
2018-01-10T11:44:14 INFO common.c: Device connected is: F0 device, id 0x20006440
2018-01-10T11:44:14 INFO common.c: SRAM size: 0x2000 bytes (8 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
2018-01-10T11:44:14 INFO common.c: Attempting to write 35648 (0x8b40) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08008800 erased
2018-01-10T11:44:15 INFO common.c: Finished erasing 35 pages of 1024 (0x400) bytes
2018-01-10T11:44:15 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2018-01-10T11:44:15 INFO flash_loader.c: Successfully loaded flash loader in sram
35/35 pages written
2018-01-10T11:44:16 INFO common.c: Starting verification of write complete
2018-01-10T11:44:17 INFO common.c: Flash written and verified! jolly good!
szszszsz