Skip to main content
Associate
Aug 7, 2025 6:27 PM UTC
Question

Debugging error while trying to program STM32l031k6u6 microcontroller

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

This topic has been closed for replies.

7 replies

Associate
Aug 7, 2025 6:38 PM UTC

How did you connect the STM with ST-LINK?

TDK
Aug 7, 2025 7:43 PM UTC

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""."
Associate
Aug 8, 2025 12:52 PM UTC

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

TDK
Aug 8, 2025 1:48 PM UTC

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""."
Tesla DeLorean
Guru
Aug 7, 2025 7:58 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Associate
Aug 8, 2025 12:54 PM UTC

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