cancel
Showing results for 
Search instead for 
Did you mean: 

STM8L052C6 Can't downlink program

Omkar Teli
Associate II
Posted on February 08, 2018 at 15:57

Hi,

   I designed PCB for STM8L052C6 and programming using ST-LINK V2 mini. I am using 3.3v GND SWIM NRST pins but is not programming. I have selected STM8L052C6 in STVP and Selected STM8L052C6 compatible compiled file. Still i am getting problem. I am directly using these four pins with ST_LINK V2. Kindly help me to solve the issue. Thanks in advance..

#cant-download-program-in-flash
4 REPLIES 4
Szymon PANECKI
Senior III
Posted on February 08, 2018 at 16:27

Hello Omkar,

Can you show your schematics with MCU?

You can also make a cross check with schematics of my board with STM8L052C6. I attach it below.

0690X00000604MFQAY.jpg

Regards

Szymon

Posted on February 09, 2018 at 06:06

I added capacitor as you did and tested now but not worked out, i am sharing my schematic0690X00000609bLQAQ.png

i kept 2 pads for SWIM and NRST and directly soldering there wire for programing. Default status of SWIM and NRST is 0.02 V. I am using ST-LINK V2 for programming.0690X00000609bpQAA.png

Posted on February 09, 2018 at 09:34

Hello Omkar,

Thanks for sharing the schematics. I made a review of it. Please find below my feedback:

Positive supply pins

VDDx, VDDA, VREF+, VLCD: connections are ok (3.3V)

Negative supply pins

VSSx, VSSA, VREF-: connections are ok (ground)

Capacitors

100nF capacitor between NRST/PA1 pin and ground is missing

100nF capacitor between VDD1 pin and ground is missing

100nF + 1uF capacitors between VDDA/VREF+ pins and ground are missing

100nF capacitor between VDD2 and ground is missing

C24 has unknown value. It should be 1uF.

Debug interface

From the schematics it seems that connection is ok: you use PA1/NRST as PAD1, ground as PAD2, SWIM as PAD3 and 3.3V as PAD4. Attaching these four wire directly to ST-Link should allow to connect to the MCU.

Please add all missing capacitors and try again. I didn't find any other problem on your schematics.

You mentioned that you measure 0.02V on 

SWIM and NRST pins. This is strange, because NRST pin has internal pull-up resistor and you should measure there value around VDD, so 3.3V in your case. Please make sure that supply voltage is attached to MCU.

Regards

Szymon
Posted on February 09, 2018 at 16:08

Hi,

It worked, Thanks a lot. Then i try to make changes. I used just 11 and 12 pins short and 100nf, 9 pin gnd, 1 pin swim. It programmed. It worked out but not on my PCB still finding problem. I will let you know when i will find it. Thanks for it.