cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK/V2 not seeng MCU

khorght
Associate II
Posted on July 12, 2012 at 20:08

Device: ST-LINK/V2 with firmware V2.J15.S4

MCU: STM8L101K3T6

i'm trying to connect MCU through the SWIM  in ST visual programmer but always getting ''Check the SWIM cable connection and check all the needed pin connections on the SWIM connector.'' ,on first plug stlink light red, after trying to read mcu memory and getting error message the stlink light-up green led with red and they never switching off.

ive conencted pins: 1-reset,7-gnd,8-vdd,32-data from MCU to the ST-LINK connector, i've tryed to connect reset pin of the MCU to ground directly and then tryed through the 0.1uF to the ground.

i've checked VÑ�Ñ� on ST-LINK( between pin 1 and 3 of the STM8 connector) and can't see any... can someone enlighten me what can i do in this situation? i thought that i must see 3.3 or maybe 5 volts, but there are always zero. on connector i see 1, indicating pin1 so there is no mistake with wires, i've checked pinout in datacheet to ensure one more time that i've not mistaken. no result.asi understand there must be always some voltage or STLINK is poweringup MCU only when programming or debugging? 

4 REPLIES 4
elil
Associate III
Posted on July 13, 2012 at 08:14

Privet Sergey,

I use ST-LINK V2 to program STM8L151C8 and sometimes with STVP.

I don't remember exactly what the blinks that you mention mean, I would suggest you to see that in ST-LINK User Manual. I think for correct PC <---> ST-LINK USB communication you should see constantly green. I mean, 1st of all, ensure whether it is USB problem or not. In my work we have a few STM8 stations, and with new PCs ST-LINK didn't work with certain USB sockets. So, try other USB sockets.

Regarding the communication with device, I would suggest you to see the electricshema of Discovery STM8 HW board, which is available in Discovery datasheet or User manual. You just need to copy the connector form there.

One more tip for you, ensure  that you don't have serial resistor on SWIM line, or if you have it, at least, it must be very small. It is because SWIM is very high speed communication line, and putting serial resistor, distorts the data.

Good luck!  

khorght
Associate II
Posted on July 13, 2012 at 08:43

i've managed to start MCU by providing external 3.3v on corresponding pins of the MCU. all works great. BUT... 

about ST-LINK manual - i've reread it and can't see any mentions about ''STLINK not providing VDD to your dev-board'' - but my ST-LINK, brand new, V2, and there are zero between VDD and GND both on STM8 and STM32 connectors.

 GREEN led must be on if (accodring to the manual) target MCU succesfully recognized and readed/writed in last(previous) session, RED blinking - PC trying to connect to ST-LINK, constant RED - PC successfully connected to the ST-LINK(not MCU), RED and GREEN blinking - transmitting/receiving data with MCU, constant RED and GREEN - don't know,but i've got this a couple of times... and ORANGE led - some error occured when trying to transmit/receive data between ST-LINK and target-MCU

About rezistor - i've seen some comments about it and some people recommend to add pull-up rezistor to SWIM pin to make data transmission a littlebit robusty. i've ignored this  because the length of the connection cable in my case is about 7-10 centimeter only.

The shema of MCU typical connection and starting up... same as for ATMEL)) - 0.1uF between VDD and GND, reset -> GND, - thats all. what i didn't undertand what is ''PIN LOADING'' with 50pf->GND, there is no such pin in pinouts for STM8L101 in the datasheet... and no expalanation about what this pin doing.

Anyway thanks for your answer.

khorght
Associate II
Posted on December 18, 2012 at 18:56

it's very strange but the very same issue appears with STM8S208RBT6... and what really strange when i'm providing ext vcc it's all right until i'm connecting st-links' plug - the external vcc regulator getting hot as hell. i've cheked the pins, schematic - no mistakes(pcb with MCU only, PCB with MCU plus some capacitors,4-pin 20MHz generator and voltage regulator and another - third PCB with capacitors, ceramic resonator 8MHz plus 470pF capacitor on VCAP pin) tryed to resolder, checked all pins connection and tested for soldering between VCC and GND and even remake PCB with no luck, tryed to provide 3.2v and 1.8v, tryed to force reset pin to the Ground. STM8L101K3T6 works flawlessly with both voltages, but three STM8S208 MCUs does not work - ST-LINK does not see any of thse MCUs on three different PCBs.

esteendijk9
Associate
Posted on January 10, 2014 at 16:18

I had exactly the same problem!!

Problem is solved by using very short wires from STLink SWD to destination. I use 3cm wires, then it works. With 15cm wires STLink won't recognize the MCU.

kind regards