cancel
Showing results for 
Search instead for 
Did you mean: 

STVP Programming Toolkit - How to Unlock Chips?

brad
Associate
Posted on September 13, 2013 at 18:37

I've looked over UM0151 and have thus far successfully developed python code that can program STM8 chips using the discovery board programmer, and modify the image.

I am trying to rapidly develop a programming/test suite for manufacturing of a product in development. I have found UM0151 to be very vague. There is no mention of chip-unlocking whatsoever. I have read of ways to do this with MASS, but I am not sure how to translate this into API calls using the STVP Dlls.

Another annoyance about the STVP dlls is their undocumented functions and proprietary database system. Why should I waste an afternoon writing code before I even understand what the database contains? End rant.

I'd appreciate some help.

Chip; STM8S005

#stm8s005 #st-link #stvp #icp
2 REPLIES 2
LaurentL
ST Employee
Posted on September 19, 2013 at 18:21

Hello,

First, to Unlock the STM8, you must reprogram the option bytes (Read Out Protection to OFF).

This will induce a Mass Erase on the program and data memories.

If you try to do a mass erase, it won't work (device is protected).

In other words, to Unlock, do the same as you would do on STVP, reprogram option bytes with the value ROP OFF.

To do that, you need to go on STVP GUI and save an Option bytes file (hex or s19) with the new values you want.

Then, you can load this file with the programming toolkit and program option bytes.

Look the code of the example STVP_CmdLine.exe.

You don't need to know the database stuff, it contains the device's description.

The easiest way for you is to take the example (STVP_CmdLine.exe) code and either adapt it or even use the exe as is for your production, it does all you need normally.

This exe is installed with STVP now (in STVP directory).

You can call the exe with parameters (prog tool, port, device, program & data & option bytes filenames...).

Regards,

Laurent

daynial
Associate II
Posted on October 15, 2016 at 11:46

is there any pin that must b ground to remove rop and code it again