2023-07-19 11:43 AM - edited 2023-07-19 11:50 AM
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:
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.
2023-08-03 05:17 AM - edited 2023-08-03 05:19 AM
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.
2023-08-03 06:03 AM
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!
2023-08-03 06:38 AM
Be sure to connect the Vcc pin of the edge connector to the target.
2023-08-03 05:30 PM
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).