2010-09-05 11:53 PM
STM8 Option byte problems
#tytyt2011-05-17 06:10 AM
try to reprogram option bytes area with default values using STVP.
brazov
2011-05-17 06:10 AM
2011-05-17 06:10 AM
hi,
for some reason you wrote option bytes not complemented. You need to perform with STVP a full erase of the memory option bytes included. So to restore default option bytes do the following: - open stvd - in option bytes tabs select ROP on - program option bytes (now memory is protected) - secelt ROP off - program option bytes (now memory if fully erased and you'd have default option bytes) brazov22011-05-17 06:10 AM
Thanks for the help thus far ...
Sadly the problem still persists.
I opened STVP, went to the option bytes tab, selected ROP and pressed
program current tab but still get the same message (Error while reading Option Bytes).
Is there any other way to return the option byte memory area to its default state?
Or might it be possible to bypass the reading of the option bytes before the memory is programmed?
If the ROP was set can the option bytes still be changed?
Regards
Louis
2011-05-17 06:10 AM
hi,
Strange, I tried in my environment and it works. When ROP is set you can't change option bytes, the only thing you can done is to put ROP off and so the whole memory is erased. Check STVP configuration, SWIM RLINK USB, and STVP options ...
brazov2
2011-05-17 06:10 AM
Hello Luis.
I had a trouble like your: no SWIM connection with STVD and STVP. My trouble was due to VCap: 470 nF is the minimum value which stabilizes the internal voltage regulator. According to the datasheet, this capacitor capacity must be 470 nF upto 3300 nF. I changed VCap to a 1uF one, and my communication errors disappeared. Regards EtaPhi2011-05-17 06:10 AM
2011-05-17 06:10 AM
Hello,
Try removing the pull-up on Swim pin. It will interfere for Swim communication (especially in high speed mode). And maybe the pull-up on reset pin is too big. (if there is a capacitor too). The reset can come from HW wdg or also if the option bytes are not complemented so as said, you must reprogram them with STVP (no need to prog ROP on and off). If still not ok, maybe update STVP soft. Rgds, Laurent2011-05-17 06:10 AM
Hi,
if in the program memory there is a bad code writing an option byte location, but not it's complement, then after programming option byte with STVP, the reset seems to be released, this causes the code in the program memory is executed again and you get again in STVP the error of bad option byte. This is the reason why I suggested to enable/disable ROP in order to erase program memory containing not well written code. In this way after programming option bytes, program memory is erased, bad code is not anymore present and executed; so you don't get error. brazov