cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging error while trying to program STM32l031k6u6 microcontroller

adithya123
Associate II

I am using an ST-link / V2 as the debugger and the microcontroller I am using is STM32l031k6u6. I am trying to debug and download a program into the microcontroller but I am facing this error. I have tried to debug and download using IAR embedded workbench as well but to no avail. 

I would be obliged if anyone can help me out. I did connect the VDD, GND, NRST, SWCLK, SWDIO pins correctly.Screenshot 2025-08-07 192619.png

 

 

Screenshot 2025-08-07 192121.pngScreenshot 2025-08-07 192221.png 

Screenshot 2025-08-07 191051.png

7 REPLIES 7
Immr_Vr_HW
Associate II

How did you connect the STM with ST-LINK?

TDK
Super User

TDK_0-1754595771885.png

The board needs powered. 0.67 V is not enough.

The programmer typically doesn't provide power, but it is available on pin 19 if the voltage is acceptable. Pins 1+2 are inputs to the programmer.

If you feel a post has answered your question, please click "Accept as Solution".

Check what you've got on VAPP pin (VTarget in ARM nomenclature), this would be critical for authentic ST-LINK/V2 pods as they have buffers powered with this.

Check you're not reconfiguring PA13/PA14, or disabling SWD operation. Perhaps IDE side settings.

Watch for the MCU being put into a power-down / low-power mode that would stop pins operating normally.

Try lower connectivity speed, currently at 4 MHz, could try 1 MHz

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

I have connected pin 19 of ST-link header to the VDD but I have not connected VAPP pins 1 and 2 to anywhere. 

I have checked with lower connectivity rates and I have used in SWD operation but I have not connected the VAPP pins to anything.

You'll need to connect pin 1 or 2 to the VDD of the chip. As @Tesla DeLorean says, these go to level translation buffer chips.

If you feel a post has answered your question, please click "Accept as Solution".

Pin 19 is used to provide power FROM the ST-LINK / J-LINK, but be careful this is not an  ARM "standard" and as I recollect the J-LINK's from back in the day had 5V, which is Segger's "standard"

Pin 1 is designed for VTarget and is TO the ST-LINK to power level translators at a target appropriate level.

Ideally you should power your own board, this power from the pods was more of a convenience to reduce connections/cables, and provide a stand-alone solution. The ARM U-LINK/REALVIEW pods has Pin 19 as No Connect

https://www.segger.com/products/debug-probes/j-link/technology/interface-description/

https://developer.arm.com/documentation/101416/0100/Hardware-Description/Target-Interfaces/ARM-Standard-JTAG

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..