2
\$\begingroup\$

I've developed a prototype using the STM NUCLEO (NUCLEO-F411RE) board and now that I am happy with design I am now in the process of testing everything together on my own PCB. All the other components designed for on my PCB are working great except for the new bare STM32F411RE (LQFP4 package) I have integrated onto the board. I am unable to connect to the board via the SWD interface to upload any program and am now completely stumped after many debug attempts! I followed all the hardware design recommendations provided in the STM32 application notes, (https://www.st.com/content/ccc/resource/technical/document/application_note/76/f9/c8/10/8a/33/4b/f0/DM00115714.pdf/files/DM00115714.pdf/jcr:content/translations/en.DM00115714.pdf).

I tried using two different programmers to communicate with the board; 1) ST-Link/V2-ISOL 2) The ST-Link that can be broken of the NUCLEO board

I verified that both of the programmers work when connecting to the correct pins on the NUCLEO-F4llRE breakout board which is VDD/SWCLK(PA14)/GND/SWDIO(PA13)/NRST/SWO(PB3). The connection verification is done with the STM32 ST-Link Utility software. The settings for the ST-Link utility are; connection settings = SWD, freq = 480kHZ (I have tried other frequencies), mode = connect under reset and reset mode is Hardware reset.

When trying to connect I get the "can not connect to target!" error from the the ST-Link utility as well as a FAIL.txt from the ST-Link V2 which contains "the interface firmware FAILED to reset/halt the target MCU". I hooked up my oscilloscope to analyze the NRST pin which I have pulled high with a 10Kohm resistor along with a cap to ground near the STM32F4 reset pin. I see that the ST-Link is sending a reset pulse but the MCU but no connection I guess. I then tried connecting to the board by pulling NRST to low with a 10k pull-down resistor and still no connection... I checked the continuity between the STM32f4 pins on the PCB and the connector pins and everything is okay in terms of soldering I guess? I believe the layout and placement of the controller is correct as I followed the ST datasheet as well as NUCLEO board layout. Maybe if someone could verify that would be great! Also I am new to PCB dev with mcu's so this very well could be a stupid mistake I am not seeing :)

Also, I have my board powered from a separate power supply before connecting the ST-LINK V2 programmer. Any help/recommendations would be much appreciated as I am stuck! Here are some photos of my setup

Schema

PCB layout

PCB

\$\endgroup\$
  • 1
    \$\begingroup\$ Double check pinout, double check connectivity to all power and ground pairs. Get a 10x loupe and inspect the soldering of all pins for shorts or even lack of fillets that might indicate a subtle open. Make sure the programmer has a common ground and that the leads are short. If the programmer cannot active NRST manually do so before, also try connecting the programmer while held in reset. Make sure the SWD lines are not shorted. \$\endgroup\$ – Chris Stratton Jun 18 at 19:39
  • \$\begingroup\$ How did you connect all of those GND pins which appear disconnected, e.g. C32 and IC4-Pin 47? \$\endgroup\$ – Tom L. Jun 18 at 19:40
  • \$\begingroup\$ Aligment of the pins vs pads in the upper lefthand corner looks suspiciously bad, and that's actually where the SWD signals are located... \$\endgroup\$ – Chris Stratton Jun 18 at 19:40
  • \$\begingroup\$ So one thing I did forget to mention is that I made a stupid mistake in my schematic to begin with when I got the board made and provided the updated schema. What happened is that is I accidentally had Vssa connected to VDD and VDDA to GND so I cut the trace from vdd to vssa which is what you see in the board. Vdda is still connected to ground could this be the issue?? \$\endgroup\$ – Robert Pollak Jun 19 at 0:56
  • \$\begingroup\$ @ChrisStratton I just made sure all the fillets are good and there are no shorts on the SWD lines, about to try the holding the reset with the programmer line connected but yes the alignment is just barely off but nothing significant everything seems okay on the pads. Is the issue because of vdda and vssa you think as mentioned in my previous comment? \$\endgroup\$ – Robert Pollak Jun 19 at 1:02
3
\$\begingroup\$

So I found what the issue was, I made a stupid mistake between the schematic and PCB so make sure you always triple check everything before sending the board out for manufacturing. I miss-connected VDDA to GND and VSSA to VDD in the schematic and only noticed it after designing the PCB and me being stupid I got distracted or whatever and never updated the PCB after fixing the schematic... The VDDA and VSSA connections are critical as it is the power supply for the internal analog circuits which consist of the internal PLL that provides the clock for controller, (given that no external oscillators is used which is what I did in the first place). No clock means no communication with the controller!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.