cancel
Showing results for 
Search instead for 
Did you mean: 

[ATT]10688

Simon Lee
Associate II
Posted on January 03, 2018 at 23:20

stm8s103f2 is not able to program hex

my product's board is based on stm8s003f3 mcu(TSSOP 20pin), but there was some problem in providing the chipset,

so I bought stm8s103f2 TSSOP20pin instead of buying stm8s003f3.

The problem was started in that point, I can not program our product hex(firmware) to stm8s103f2, I know it has 4kbytes flash comparing stm8s003f2 has 8kbytes, but our hex file size is under 4kbytes,

When programming it by using STVP and ST-Link/v2 SWIM, always come up the pop-up message 'The device is protected'. I used option byte to solve it but nothing is effect.

(the board always works good on stm8s003f3)

How to solve this problem?, is it not compatible stm8s103f2 and stm8s003f3?

My capture image and schematic, mcu picture is attached. please help me.

#stm8s103f2 #stm8s003f3 #stvp #swim
4 REPLIES 4
LaurentL
ST Employee
Posted on January 04, 2018 at 16:57

Hello,

The device on the photo is

stm8s103f2 so why selecting

stm8s003f3 in STVP ?

Select the right device in STVP (stm8s103f2) and see if you have the same issue, if yes, reprogram option bytes with read protection off.

Rgds,

Laurent

Posted on January 04, 2018 at 17:43

Is there no method for the tool to extract a part or die identification, this kind of part-selection is very 1980's

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 05, 2018 at 07:23

In fact, I think there is. STVP complaints if you don't choose the right part, which is kind of funny in fact.

I have made my own swim dongle, and I really don't need to know the part no. exactly, but I do need to know the block size (64 or 128 bytes). For now I resolve this by a command line option. (STM8L may be a bit different, I work only with S and AF parts right now).

Too bad this is completely undocumented. I also have a big question mark about the UID (for the chips that they are supposed to have it). At that address there are only zeroes, which don't look like an UID...

Simon Lee
Associate II
Posted on January 05, 2018 at 09:04

Thank you,

The issue is solved, selecting stm8s103f2 and writing option byte to recover read-out lock is key point.

I didnt know completely about STVP program. I have to learn it more.

Thank you to all.