2013-09-13 09:37 AM
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 #icp2013-09-19 09:21 AM
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, Laurent2016-10-15 02:46 AM
is there any pin that must b ground to remove rop and code it again