cancel
Showing results for 
Search instead for 
Did you mean: 

Read and write using ST-Link V2

AKh.2
Associate II

Hi everyone,

I do have 2 PCB boards based on STM32F030F4P6 MCU, the two PCBs have the same hardware and connection with other components, I read the first MCU's code using ST-LInk V2 -using SWD- and saved the .hex file to my PC then I wanted to re-program the other one with the same code, the programming proccess works well and the ST Link utility says that it success but when trying to run the code it says "unable to run"

what shall I do to correctly copy the same code? I program the flash memory and make sure that the Option Bytes are the same, what else must be copied to let the MCU work?

Thanks in advance.

12 REPLIES 12

I guess that I got my problem, so my question will be: how to correctly read the whole flash memory? as I was trying to read it following the program's default settings (address : 0x08000000 and size : 0x400), I've tried to read from 0x0 up to 0x10000000 just to try getting the whole size but the program says: Error: Data read failed.

It says your part has 32KB, so size would be 0x8000

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@Community member​ Everything WORKED ����

Thanks alot for your help, also thanks to @TDK​