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:
- Reset is pulled high
- Boot0 is pulled low
- VCC is stable at 3.3V and appears at all desired pins of the board (according to AN4661, https://www.st.com/content/ccc/resource/technical/document/application_note/b0/5c/ba/b2/cb/10/41/dd/DM00164549.pdf/files/DM00164549.pdf/jcr:content/translations/en.DM00164549.pdf)
- GND is connected to all the necessary pins
- VCAP 1/2 connected to 2.2uF capacitors
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!