Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write protection #3

Open
josemariaaraujo opened this issue Apr 19, 2018 · 3 comments
Open

Write protection #3

josemariaaraujo opened this issue Apr 19, 2018 · 3 comments

Comments

@josemariaaraujo
Copy link

When you say:

Using STVP-STM32 on Windows confirmed my guess and made it even worse. So not only the ROP is set, the write protection is also set. So there neither real software reverse engineering possible nor can you recycle the existing processor. Software needed to be build from scratch.

They also activated the write protection, so unfortunately you have to replace the IC on the board.

I think it's not correct. According to the reference manual RM0016 page 50, in SWIM mode (external programmer) you can write to the ROP to disable the protection, erasing the STM8 in the process. But then you can program it again.

But having another STM8 is not a bad idea until a new stable firmware is developed that can replace the original one.

@zerog2k
Copy link

zerog2k commented Jul 29, 2018

@soundstorm
Did this not work to clear out rop in option bytes?
vdudouyt/stm8flash#38 (comment)

Ref
https://www.st.com/resource/en/datasheet/stm8s005c6.pdf#page38

@spth
Copy link

spth commented Sep 20, 2018

Maybe the UBC write protection was set, too? One could disable it by preparing a suitable hex file for the option bytes, then use stm8flash.

Philipp

@herm
Copy link

herm commented Oct 11, 2018

You can easily unlock this device with these commands:

echo "0000ff00ff00ff00ff00ff00ff00ff00ff" | xxd -r -p > opt_bytes
stm8flash -c stlinkv2 -p stm8s005k6 -s opt -w opt_bytes

It erases the whole device and resets the option bytes to their default values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants