cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S003F3P6 is protected

RomanoLorenzo
Associate II

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

3 REPLIES 3
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
RomanoLorenzo
Associate II

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

Vadim_
Visitor

Hi Lorenzo,

I had the same problem: 5pcs of STM8S003F3P6 & ST-Link V2 from Ali and ST Visual Programmer (STVP) answers 'Protected device' for IC just from the tape carrier.

And the marking of the 1st pin has some strange view: the marking ring is not smooth as in previous ICs, but as burned.

I opened 'OPTION BYTES' tab in STVP, selected 'Read Out Protection Off' and executed Program \ Current Tab.

This is obvious step for Protected Device, but I had not such a problem with new STM8 before, so I tried to PROGRMA MEMORY, read it or read OPTION BYTES, but not to write OPTION BYTES as the 1st step.

After this the programming functions ran correctly.

For programming it's enough to solder 5 pins of  STM8S003F3P6:

pin 9 to 3.3V of  ST-Link

pin 7 to GND

pin 4 to SWCLK

pin 18 to SWIM

pin 8 - capacitor 0.1uF to GND.

This is enough & obligatory for PROGRAMMING.

 

Best regards, Vadim