2018-01-03 02:20 PM
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 #swim2018-01-04 07:57 AM
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
2018-01-04 09:43 AM
Is there no method for the tool to extract a part or die identification, this kind of part-selection is very 1980's
2018-01-04 11:23 PM
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...
2018-01-05 12:04 AM
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.