Skip to main content
OLyke
Associate
November 2, 2018
Solved

How can I resolve ST-Link "No device found on target" error?

  • November 2, 2018
  • 3 replies
  • 25298 views

TL;DR What's the magic sauce for connecting to an STM32F7 with SWD on ST-Link?

Hello everyone. I am perplexed because I have been unable to program my custom board based on the STM32F765VGT6. (Hardware Eagle files + pdfs, Logic data captures, and some screenshots attached for reference)

When I try to program my board with ST-Link I get the error

"Error in initializing ST-Link device.

Reason: (4) No device found on target."

But I can't find a lot of information on what that means.

My problem seems very similar to the unresolved thread here:

https://community.st.com/s/question/0D50X00009XkXslSAF/stm32f103rbt6-error-no-device-found-on-target

As suggested in that thread I have confirmed that:

Additional hardware details:

I have 20 ohm resistors in series with SDCLK and SWDIO, and those two lines also have 10k pullups to 3.3V -- holdover from my previous working design.

I have a 24 MHz external crystal with 18 pF caps.

I am using a custom cable to wire between CN6 on the ST-Link and my Corte debug style connection. I'm pretty sure I have triple-checked this but here it is anyway:

CN6 PIn ---> Cortex Pin ---> STM32 Pin

1 (AIN_1) ---> 1 (3.3V) ---> ---- (Board VCC @ 3.3V)

2 (SWCLK) ---> 4 (SWDCLK) ---> PA14 (SWCLK)

3 (GND) ---> 3 (GND) ---> ---- (Boad GND)

4 (SWDIO) ---> 2 (SWDIO) ---> PA13 (SWDIO)

5 (NRST) ---> 10 (Reset) ---> NRST (Pin # 14 on my LQFP100 package)

6 (SWO) ---> Not connected ---> Not connected

I also tried to program with a bare-minimum approach on a new pcb - this time without pullups on SWD lines and without external oscillator - still no luck.

I am using Atollic TRUEStudio in conjunction with STM32CubeMX, as well as an ST-Link that came with an F7 Nucleo dev board. The ST-Link can communicate with the Nucleo without any trouble ( and yes, I did remember to take off the jumpers to enable CN6... but not until after having a false moment of happiness! )

As an additional note: One of the two test boards was fully populated and reflowed in my school's oven. The other had only crucial power supply and programming connections and the microcontroller itself and was hand-soldered an an attempt to avoid damage to the IC. In both cases I got the same error message.

I'm really excited to start programming my board but this problem has been kicking my ****. Can anyone offer some insightful clues? I've uploaded as much contextual data as I could including the schematic, and board layout (simplified) as well as logic analyzer captures for a few different test scenarios. Finally I uploaded a separate logic capture of how the connection process should look (from programming my Nucleo). You can download the free software to view the '.logicdata' files here: https://www.saleae.com/downloads/

Thanks in advance!

This topic has been closed for replies.
Best answer by Piranha

Hello!

The problem is because You haven't connected VDDA and VSSA pins. Look at a reference schematic on page 38 of AN4661 "Getting started with STM32F7 Series MCU hardware development" and read section 1.2 "Power supply scheme" on page 11:

"VSSA, VDDA = 1.7 to 3.6 V: external analog power supplies for ADC, DAC, Reset blocks, RCs and PLL. VDDA and VSSA must be connected to VDD and VSS, respectively. The VDDA pin must be connected to two external decoupling capacitors (100 nF ceramic + 1 μF tantalum or ceramic)."

Consider connecting VREF+ to VDDA. And VBAT also should be connected one way or another:

"VBAT = 1.65 to 3.6 V: power supply for the RTC, the external clock 32 kHz oscillator and backup registers (through power switch) when VDD is not present. The VBAT pin can be connected to the external battery (1.65 V < VBAT < 3.6 V). If no external battery is used, it is recommended to connect this pin to VDD with a 100 nF external ceramic decoupling capacitor."

3 replies

Piranha
PiranhaBest answer
Principal III
November 2, 2018

Hello!

The problem is because You haven't connected VDDA and VSSA pins. Look at a reference schematic on page 38 of AN4661 "Getting started with STM32F7 Series MCU hardware development" and read section 1.2 "Power supply scheme" on page 11:

"VSSA, VDDA = 1.7 to 3.6 V: external analog power supplies for ADC, DAC, Reset blocks, RCs and PLL. VDDA and VSSA must be connected to VDD and VSS, respectively. The VDDA pin must be connected to two external decoupling capacitors (100 nF ceramic + 1 μF tantalum or ceramic)."

Consider connecting VREF+ to VDDA. And VBAT also should be connected one way or another:

"VBAT = 1.65 to 3.6 V: power supply for the RTC, the external clock 32 kHz oscillator and backup registers (through power switch) when VDD is not present. The VBAT pin can be connected to the external battery (1.65 V < VBAT < 3.6 V). If no external battery is used, it is recommended to connect this pin to VDD with a 100 nF external ceramic decoupling capacitor."

OLyke
OLykeAuthor
Associate
November 3, 2018

Thanks @Piranha​ - This totally solved the problem.

Tesla DeLorean
Guru
November 2, 2018

What the other guy says..

Note NRST being clamped low in your plot.

With out connecting debugger check voltages on NRST and VCAP.

Lack of VDDA will clamp reset, as it is thresholded by the POR circuit.

Not seeing 1.25V on VCAP suggest a power or orientation issue.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
OLyke
OLykeAuthor
Associate
November 3, 2018

@Community member​ Thanks for explaining why VDDA is required - now I won't make that mistake again.

OLyke
OLykeAuthor
Associate
November 2, 2018

Thank you both! I will try with those changes soon and come back with the results.