2023-04-29 02:54 PM
Hi everybody,
I am using the STM8S003F3P6 development board (little blue one bought from AliExpress) and I am trying to program it using ST-LINK V2 (also bought on AliExpress).
I wrote the code using STVD and now I would like to program the MCU. I tried to follow the "standard" procedure to program the microcontoller but it doesn't work. The ST Visual Programmer displays the following error:
Error: The device is protected
I searched for the solution in internet, and everybody says that I have to unlock the Read Out Protection. Those bits were already set to 0, but I cleared them anyway.
This should have solved my problem, but unlikely the problem is still there.
I read the datasheet and I didn't find any solution. I want to say that I tried programming another chip (same microcontroller model, same ST-LINK, same software tools) and everything works perfectly. Can someone help me please?
Thanks,
Lorenzo
2023-04-30 12:26 PM
Welcome, @RomanoLorenzo, to the community!
There can be two serious problems, since you also bought the ST-LINK/v2 from Aliexpress, which is pretty much a little colored metal box and therefore a fake or counterfeit, right?
But since you can program similar types with the presumed fake, it must inevitably have to do with the STM8, which is probably a counterfeit, as they are very often found on Aliexpress.
So you should contact Aliexpress and try to exchange the board or claim your money back.
Hope that helps?
Regards
/Peter
2023-05-03 08:02 AM
Thanks Peter for your answer,
The ST-LINK/v2 is 100% fake, it is based on the Geehy APM32F103C8T6 microcontroller, but luckily it works fine.
I tried programming the STM8 again and again, but still doesn't work. I thin you are right; it must be fake!
I will try again, and if i won't be able to program it I will try to decap the chip in order to find out more.
Meanwhile if anybody knows anything more, i appreciate every kind of advice.
Thanks,
Lorenzo