2018-02-08 06:57 AM
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-flash2018-02-08 07:27 AM
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.
Regards
Szymon
2018-02-08 10:06 PM
I added capacitor as you did and tested now but not worked out, i am sharing my schematic
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.
2018-02-09 01:34 AM
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 missing100nF capacitor between VDD1 pin and ground is missing100nF + 1uF capacitors between VDDA/VREF+ pins and ground are missing100nF capacitor between VDD2 and ground is missingC24 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
Szymon2018-02-09 08:08 AM
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.