cancel
Showing results for 
Search instead for 
Did you mean: 

STLink V3-MINIE edge connector SWD not working

DAlbe.3
Senior

I have an STLink V3-MINIE.  For targets that don't have an STDC14 connector, I use it with a breakout board connected to the STDC14 connector via ribbon cable.  The breakout board splits the connections to 0.100" pins so I can connect to my targets using 0.100 dupont jumper wires.  Everything works great that way: both UART and SWD functionality.

However, I also soldered a 2x5 0.100" pin header to the 2mm edge connector at the end of the MINIE to eliminate the need for the ribbon cable and breakout board.  Here, the UART functionality works, but the SWD does not and it does not in a very interesting way:

  • Even though the 0.100 pins on the edge connector show very low (virtually none) DC resistance to the respective pins on the STDC14 breakout board, only the UART functionality works; SWD does not.
  • When I connect SWDIO and SWCLK to the breakout board and observe the signals (with a scope) at the edge connector, SWD works and the signals look identical to the signals if I connect SWDIO and SWCLK to the edge connector and observe them at the breakout board (but then SWD does not work).
  • If I connect both SWDIO and SWCLK to the breakout board, SWD works
  • If I connect SWDIO to the breakout board and SWCLK to the edge connector, SWD works.
  • If I connect SWCLK to the breakout board and SWDIO to the edge connector, SWD works.
  • If I connect both SWDIO and SWCLK to the edge connector, SWD fails.
  • Oddly, the Vcc (target voltage detect) connection has a similar issue and must be connected to the breakout board even though the STLink reads the correct target voltage when Vcc is connected to the edge connector (but SWD connections won't work).

Because so many targets don't yet have STDC14 connectors and rely on 0.100" pin headers, it would be great if ST could help get the MINIE working for SWD via the edge connector.  Would it be possible to get a schematic showing any components between the two connectors?  Any other ideas about what could be causing this?  FYI, both the ribbon cable and the dupont wires are 6" in length.

4 REPLIES 4
Thierry GUILHOT
ST Employee

First, it is important to note that the communication frequency is higher on the SWD interface than on the UART one. This is certainly explaining the behavior difference that you are observing.

If I've well understood your tests, to connect SWDIO and SWCLK signals to the breakout board, you are using 6" length flying wires using the edge connector and a 6" length flat cable using the STDC14 connector. In my opinion, the flying wires are introducing signals integrity issues such as crosstalk, noises which perturbate the communication. Adding the oscilloscope probe is adding a small capacitor to ground which is sufficient to reduce or cancel the issue. Enabling both interfaces at the same time is having a similar effect.

An option to work around this, is to reduce the SWD communication interface by changing the communication frequency parameter from the debugger or programming tool.

I confirm you that there is no component (resistor or capacitor) between the edge and STDC14 connectors.

Thank you Thierry, you understood perfectly and I appreciate the feedback.

Clearly there were communication problems and I believe (hope) that I'd played with the speeds, but unfortunately I didn't take notes and had incorrectly focused on the MINIE connectors. What was most surprising was that the cases that worked should have been worst with respect to crosstalk and phase shift (it worked both with the longest parallel run (DIO and CLK both = ribbon-to-breakout-board to flying leads) and also with the asymmetric cable lengths (one=ribbon-to-breakout to flying lead, other just flying lead from edge connector). 

I went back to look at this again today and, of course, was unable to reproduce the problem; I have no explanation.  My best scope has 500MHz BW and I have both low capacitance and also active FET probes for it; if I can get this to happen again, I'll take a closer look and report back with pics.  For now, I'm mystified.  Thanks again for the reply and your help!

Pavel A.
Evangelist III

Be sure to connect the Vcc pin of the edge connector to the target. 

Thanks @Pavel A., as noted in the original post, the Vcc line was connected and SWD was behaving differently depending on whether Vcc was connected to the breakout board or the edge connector (even though it was correctly reading the target voltage on either).  At this point, I suggest closing this ticket because I cannot reproduce the problem and it seems likely that the cause was something different (e.g. a problem with one of my flying leads).  If I'm able to reproduce it, I will do a more careful analysis with a good scope (for the original submission, I'd just used the scope + probes that happened to be on my bench which were not ideal).