Topic : STM8_PGM.EXE - Erase Problem

Forum : ST7/STM8

Original Post
Post Information Post
May 20, 2010 - 10:04am
Guest

Hi,

to program a STM8S207S8 in our application we are using the tools Ride 7 (7.28.10.-0075) and RKit-STM8 for Ride 7(2.28.10.0092) via Raisonance R-Link.(Firmware Version:0.0.3)

Now we have the problem that sometimes a STM8S207S8 is not erasable and an error message occurs via command line tool.

The read command seems to be OK. Also an attempt to use the windows tool shows the same effects.
The Button "Connect to target STM8 and read Die Id" shows "Successfully connected to target STM8.Device Die Id is: 0x37394142"
If i use the STVP-Tool with 00 filled tabs the program all command works fine. After that we use the Rflasher to blank-check the device which also works fine. Now program and verify with rflasher7 is OK.

Here are some different attempts:
------------------------------------------------------------------------
C:\Programme\Raisonance\Ride\bin>stm8_pgm.exe TSTM8S207S8 E
STM8_pgm: software for programming STM8 devices using an RLink as master.
Copyright Raisonance 2007-2010.

(0) Selecting target: STM8S207S8... OK

(0) (0) Connecting to RLink... OK
Connecting to target STM8... OK
Device Die Id is 0x37394142

Erasing Flash, EEPROM and Option Bytes...
!!! Error 603: Error reported by the device.

-------------------------------------------------------------------------
C:\Programme\Raisonance\Ride\bin>stm8_pgm.exe TSTM8S207S8 EF
STM8_pgm: software for programming STM8 devices using an RLink as master.
Copyright Raisonance 2007-2010.

(0) Selecting target: STM8S207S8... OK

(0) (0) Connecting to RLink... OK
Connecting to target STM8... OK
Device Die Id is 0x37394142

Erasing Flash...
!!! Error 603: Error reported by the device.

----------------------------------------------------------------------------
C:\Programme\Raisonance\Ride\bin>stm8_pgm.exe TSTM8S207S8 EE
STM8_pgm: software for programming STM8 devices using an RLink as master.
Copyright Raisonance 2007-2010.

(0) Selecting target: STM8S207S8... OK

(0) (0) Connecting to RLink... OK
Connecting to target STM8... OK
Device Die Id is 0x37394142

Erasing EEPROM...
!!! Error 102: No response from the DTC (Data Transfer Component)

-----------------------------------------------------------------------------
C:\Programme\Raisonance\Ride\bin>stm8_pgm.exe TSTM8S207S8 EO
STM8_pgm: software for programming STM8 devices using an RLink as master.
Copyright Raisonance 2007-2010.

(0) Selecting target: STM8S207S8... OK

(0) (0) Connecting to RLink... OK
Connecting to target STM8... OK
Device Die Id is 0x37394142

Erasing Option Bytes... OK
(2) Closing com with RLink... OK
(2)

------------------------------------------------------------------------------
C:\Programme\Raisonance\Ride\bin>stm8_pgm.exe TSTM8S207S8 E
STM8_pgm: software for programming STM8 devices using an RLink as master.
Copyright Raisonance 2007-2010.

(0) Selecting target: STM8S207S8... OK

(0) (0) Connecting to RLink... OK
Connecting to target STM8... OK
Device Die Id is 0x37394142

Erasing Flash, EEPROM and Option Bytes...
!!! Error 603: Error reported by the device.
--------------------------------------------------------------------------------

I hope you can assist me with this problem.

Thanks.

Replies
Post Information Post
+1
0
-1
May 20, 2010 - 11:57am
Raisonance Support Team

Hi,

Well, it seems to work fine here.

Can you please tell us exactly everything that is written on the chip? (or send a picture of it)

You said that 'sometimes a STM8S207S8 is not erasable' ... Could you please elaborate on the 'sometimes'?
Is it some devices that work and not others?
Does it depend on the previous state of the Flash? (blank or not)

Can you send us the hex file that you downloaded before erasing? (support@raisonance.com)

Are you working on a commercial board (which one?) or your own? (can you send the schematic?)

Best Regards,

Vincent

+1
0
-1
May 26, 2010 - 8:40am
Guest

Hi,

at about 2 percent of our boards show this erase error.
For example the first, second and third try show the error, the fourth try was OK. Some Boards are every time OK, some other boards not.
Some Boards are blank, some others are programmed.

We are working on our own board.

If I use the STVP to program blank tabs(as replacement for the erase function of R-Flasher 7) and then I use Blank Check, Program and Verify of R-Flasher 7 the bad boards working fine.
It seems that only the erase function is affected.
Is it eventually possibly to reduce the "Erase-speed" like the option U in the command line tool for slow programming?
We also try to program a file filled with zeros to replace the erase command, but here a message appears that that the file is empty. Via Windows R-Flasher the "empty" file was successfully programmed, but the verify afterwards shows an error.

Is there perhaps some kind of timing problem in the usb-driver or SWIM? But why does it work with most of the boards?
We are using Windows XP.

You will find the requested documents on your E-Mail

Thanks and best regards
Andreas

+1
0
-1
May 31, 2010 - 6:17pm
Raisonance Support Team

Hi,

I took a quick look at your schematic and I saw that you have a 1K pullup resistor on the SWIM line.
If you also plugged the ADAPT jumper on the RLink ADP, then the resulting pullup might be too high, preventing the RLink or STM8 from driving the line low.

How did you plug the jumpers? (you must plug SWIM, and you must not plug PW_5V and 12MHz. Try both with and without ADAPT)

Also, please provide more information on how the board is powered.
The Erase operation is one of the operations that use the more power, so if you are at the limit, it's possible that it works with some boards but not others.
And there are several possible procedures for doing it, possibly consuming differently, which could explain why you see the problem with RFlasher but not STVP.

Best Regards,

Vincent

+1
0
-1
June 2, 2010 - 10:49am
Guest

Hi,

here is my RLink ADP Jumper setting : SWIM Jumper is plugged, PW_5V is not plugged, 12Mhz is not plugged and ADAPT is also not plugged because of the 1k resistor on board. (I tried different Pull-Up/ADAPT combinations.)
Low level, high level, rise time and fall time of the SWIM line seems to be OK(related to ST datasheet)

I made some tests with different power supplys(up to 3A) and an Goldcap on Vcc - no improvement.
I also took a look on swim line related to reset and power line via oscilloscope. There are no obvious anomalies visible.
But if the error occurs, the "Erase" Sequence takes longer(ca. 12sec.) than in good case.(less than 4 sec.)
I could send you screenshots, if this would be helpful.

You mentioned several possible procedures. Is there another measure or test i could try out?

best regards
Andreas

+1
0
-1
June 2, 2010 - 12:01pm
Raisonance Support Team

Hi,

You can tell the software to use the slow erase procedure by following this sequence:

1. close all instances of Ride, RFlasher, STM8_pgm, STVD and STVP. (and any other software that might connect to RLink)

2. Edit this file in a text editor:
\bin\STM8_SWIM_productinfo.txt

3. Search the file for this string:
Flash_Slow_Erase=0

4. Replace the string above by this one:
Flash_Slow_Erase=1

5. Save the file, run the erase procedure. It will take much longer (around 25 seconds) but if the problem is related to tight timings, it might succeed on devices on which the normal procedure failed.

Please tell us if that allows to erase the faulty boards.

Best Regards,

Vincent

+1
0
-1
June 22, 2010 - 9:59am
Guest

Hi,

now it works perfect! :-)

Great Work!

Thank you very much!

Best Regards
Andreas

+1
0
-1
July 28, 2010 - 5:56pm
Guest

I had some problem with STM8S207R6 and last RIDE and STM8S compiler release.
I think that better change something in timing procedure.
I fix problem changing parameter as explained before.
Problems happens after about 300/400 erase procedure.
Regards

+1
0
-1
December 3, 2010 - 1:06pm
Guest

Dear VincentC,
a have the same problem with programming STM8AF616 in our production line.
About 10% of our modules fail with this message. I tried with "U" option but there is no change.
--------------------------------------------
(0) Selecting target: STM8AF616... OK

(0) (0) Connecting to RLink... OK
Connecting to target STM8... OK
Device Die Id is 0x79412

Erasing Flash, EEPROM and Option Bytes...
!!! Error 603: Error reported by the device.
-------------------------------------------------------

I did not find the " Flash_Slow_Erase" flag in my configuration file.

There is a strange situation we discovered - the fail modules PASS the programming if we cool the controller using a cooling spray.
Using an oscilloscope I saw that the low level of the pulses from the programmer to the module is about 1V. The additional pull-up jumper is disconnected. The level is the same for PASS and FAIL modules. There isn't pull-up resistor in the target PCB. Is it a normal low level on the programmer out? We use the external board "RLink ADP_ST7_STM7, ver1.0".
Please, give us your proposal how to solve the problem.
Regards