Skip to main content
Associate
August 7, 2025
Question

Debugging error while trying to program STM32l031k6u6 microcontroller

  • August 7, 2025
  • 3 replies
  • 420 views

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

3 replies

Associate
August 7, 2025

How did you connect the STM with ST-LINK?

TDK
Super User
August 7, 2025

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
August 8, 2025

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
Super User
August 8, 2025

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
August 7, 2025

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Associate
August 8, 2025

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