Skip to main content
Associate II
May 16, 2024
Solved

STM32CubeProgrammer

  • May 16, 2024
  • 2 replies
  • 3230 views

I am trying to program a chip using an STLINK V2. I am using only SWDIO, SWCLK, and ground, and I am powering the chip with 3.3 V. When I try to connect using STM32CubeProgrammer, it does not connect. Am I missing something?

Best answer by tomm5771

I added 3.01k pull up resistors to SWDIO and SWCLK and that got it working.

2 replies

Tesla DeLorean
Guru
May 16, 2024

What's the error specifically say?

An inability to connect suggests the part is currently not viable or powered.

The Pin 1 or 2 of the 20-pin ST-LINK ARM JTAG header should have Target Power (VTarget) *FROM* the target board to ensure the buffers in the ST-LINK can be powered.

Connect NRST is you want "Connect Under Reset" to be able to do anything.

ST only supports authentic equipment, there is going to be no support for boot-leg or counterfeit pods.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
tomm5771Author
Associate II
May 16, 2024

It says "No STM32 target found". With a Nucleo board I am using a 3.3V power supply to power the board. Then I have pin 1 on the JTAG connected to 3.3 V, as well as GND and SWDIO and SWCLK. I still get the error.

Tesla DeLorean
Guru
May 16, 2024

Trying to keep up here

You have a stand-alone ST-LINK/V2 and/or a NUCLEO board?

You're trying to connect to a custom board? This board have a schematic? A wiring diagram for what you've connected?

If you have a NUCLEO board connecting to an external ST-LINK you can't use the 6-pin header. You need to disconnect the on-board ST-LINK/V2-1 and then connect to the SWDIO/SWCLK via the removable pair of jumpers.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
tomm5771Author
Associate II
May 17, 2024

I have both a custom board and a NUCELO. I am able to connect to the NUCLEO using target VCC, SWDIO, SWCLK, and GND, and I am powering the NUCLEO board with 3.3V. I am not able to connect the custom board when I power it with 3.3V, and I am using the same 4 pins (target VCC, SWDIO, SWCLK, GND). Do I need to use the NRST pin, because I do not have access to it.

Tesla DeLorean
Guru
May 17, 2024

You don't need NRST, but methods of connection using the pin won't be viable without it.

Still don't know which STM32 you're attempting to connect too, nor salient portion of the schematic.

The part needs to be electrically viable for the debugger to connect. ie failure suggests board is broken

Check part orientation, check capacitors and voltages at VCAP pins, if appropriate. Expect 1.25 V, using 2u2 F per pin individually, 4u7 F if connected together.

Observe voltage on NRST pin, should be high normally, some issue if clamped LOW. Pin should not be tied high, or driven high with a push-pull driver from elsewhere on the board.

Check VDDA, part needs analogue supply for POR, PLL, VCO, regardless of use of ADC/DAC

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
tomm5771AuthorBest answer
Associate II
May 17, 2024

I added 3.01k pull up resistors to SWDIO and SWCLK and that got it working.