cancel
Showing results for 
Search instead for 
Did you mean: 

Swim - Chip does not answer

johanbleumers9
Associate II
Posted on September 06, 2012 at 09:37

Hi,

I am debugging software for an STM8S105x6, using the programmer from the STM8S-Discovery board and STVD software.

All went fine, until suddenly an error popped up while entering debug mode: '** Connection error (usb://usb): swim error [30006]: comm init error: chip does not answer'. Also STVP cannot connect to the MCU.

I've tried to other boards (that have worked before). I've directly soldered the SWIM wires to the board. Without any result.

When i changed the programmer a first time, the problem remained. But with a third programmer, the problem was solved.

But after a while the problem came back.

This programmer still seems to be ok, because i can program the MCU on the demoboard itself.

I have no clue what can be the problem.

Some more info about the board:

 * GND, reset and dataline for SWIM are connected. VCC is not connected

 * The reset pin has a 10nF cap to gnd and 10K to the VCC (i have tried to remove both)

 * VCC = 5V1

Anyone an idea what is wrong???

Regards,

Johan

11 REPLIES 11
johanbleumers9
Associate II
Posted on September 06, 2012 at 10:41

I have attached some scope pictures:

Yellow trace is the SWIM pin, purple trace is the reset.

* Succesfull.BMP: succesfull programming (other product)

* Fail First time. BMP: programming a faulty pcb for the first time after the programmer is connected to a USB port. (Reset is high before programming)

* Fail Second time.BMP: next programming cycle. (Reset stays low)

Maybe this can help to find a sollution...

Regards,

Johan

________________

Attachments :

Fail_First_time.BMP : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzJe&d=%2Fa%2F0X0000000bKn%2FNxmgO07kPa13c4JvkE1CRUnrgcof.XAZzgfU2BQqfQ4&asPdf=false

Fail_Second_time.BMP : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzNa&d=%2Fa%2F0X0000000bKk%2FF1H_A5Ier0HXTzcv.Avu_RnUvATy2GdwcBtaebg2vMM&asPdf=false

Succesfull.BMP : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzNV&d=%2Fa%2F0X0000000bKl%2FMP982kHOcptrCVsXTQvsUmXycdjkIxk6QgyKefhcOOc&asPdf=false
nholzem
Associate II
Posted on September 06, 2012 at 12:25

VCC pin on swim connector must be tied to 5V

johanbleumers9
Associate II
Posted on September 06, 2012 at 13:01

Thanks for your answer.

Initialy it worked without VCC connected. The scope screenshots are all made without VCC connected (also the good one).

On the other hand, i forgot to mention i've allready tried to program with VCC connected. But the result was the same...

Is it possible that progamming without VCC connected workes for a while, but damages the programmer or the target MCU after a some programming cycles???

nholzem
Associate II
Posted on September 06, 2012 at 13:21

A wrong connection shouldn't damage anything on the chip.

I have my own board with a STM8 micro and a SWIM header.

I get the same message as you when I connect the SWIM erroneously (and that happened many times without any damage): either swapping Reset and Swim pins, or not connecting VCC.

I'd suggest you double check your wiring. 

On the discovery board, 1 is Vcc, 2 is Swim, 3 is Gnd, 4 is Reset.

(NB: the 10k resistor is not required, there's an internal pull-up. I'd say the capacitor is required only if you intend to reset the chip manually - i.e. with a push-button)

johanbleumers9
Associate II
Posted on September 18, 2012 at 16:36

After blowing up four STM8 discovery boards, i decided to buy an ST-LINK/V2. Again, this worked fine for a while, but today suddenly failed...

Some of the programmers that have failed, still can communicate with the MCU on the discovery board, but not with the target board. Others simply do not connect to any MCU.

When we connect the faulty ST-LINK/V2 to an MCU, the target PCB draws a current that is more than usual (+ 50mA).  Also the temperature of the MCU in the ST-LINK raises 25K above room temperature.

Any idea what might cause these programmers to fail? There must be something we do wrong, but what???

The PCB is mounted in a programming tool with a needle bed that connects it to the programmer. The 24V supply pin is shorter than the other, so power comes up after all other contacts are closed.

Regards,

Johan

leetoun
Associate
Posted on October 27, 2012 at 07:13

Have u got any solution about the st-link v2 error:30006 ?

i encounter the same error.

rgds

kapilsinghi123
Associate II
Posted on July 14, 2014 at 11:20

Attach 470uF to Vcap pin, refer to discovery Schematic ! 

kapilsinghi123
Associate II
Posted on July 14, 2014 at 11:21

Not a hard requirement!  (vcc to 5V)

kapilsinghi123
Associate II
Posted on July 14, 2014 at 11:23

Attach 470nF(not uF as mentioned in some of below posts) to Vcap pin, refer to discovery Schematic!