cancel
Showing results for 
Search instead for 
Did you mean: 

how to how to unlock the protection before programming with the command line tool

lihongzhai
Associate
Posted on June 24, 2014 at 08:36

 

I am downloading file to chip with stlink/V2, the command line tool works fine for me.

However, if the chip is on protect statue, the command line tool failed with below log:

>>> Erasing PROGRAM MEMORY

The device is protected

Operation aborted

Could anyone give me some clue on how to unlock the protection?

BTW, if the chip is protected by Jlink's ''secure chip'', can stvp unlock it?

#st-link/v2-stvp #stm32
3 REPLIES 3
LaurentL
ST Employee
Posted on June 24, 2014 at 11:27

Hello,

You have to reprogram the option bytes to unprotect the device.

First use STVP to save the option bytes filename Opt_filename.hex with RDP at level 0.

Then use argument -FileOption=Opt_filename.hex in cmd line tool.

Regards,

Laurent

lihongzhai
Associate
Posted on July 03, 2014 at 05:51

Thanks, works  for me.

LaurentL
ST Employee
Posted on July 03, 2014 at 09:56

Hello,

I didn't see the 2nd question, if the Jlink ''secure chip'' is the ST option ''Chip protection (level 2)'': No tool can unprotect it.

The device is then like a ROM device without any debug/reprog possible.

Rgds,

Laurent