Skip to main content
Visitor II
June 24, 2014
Question

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

  • June 24, 2014
  • 3 replies
  • 2103 views
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
    This topic has been closed for replies.

    3 replies

    ST Employee
    June 24, 2014
    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

    Visitor II
    July 3, 2014
    Posted on July 03, 2014 at 05:51

    Thanks, works  for me.

    ST Employee
    July 3, 2014
    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