The fantastic STM32 Discovery boards from ST Micro all come with an embedded ST-Link/V2 debugger onboard, including some jumpers to disconnect it from the target device for use as a standalone SWD debugger. Presumably, this is to allow for easy use debugging a custom end-product PCB, but it’s also useful if you have any other STM32 evaluation boards hanging around with no built-in debugger, but don’t happen to have a proper JTAG dongle handy. Here’s how to make an adapter.
It happens to be the case that I’ve got an STM3210E-Eval board I need to work on, but no compatible JTAG debugger handy. I do have a ton of Discovery boards, so now I just need an adapter to use the Serial Wire Debug capabilities on the STM3210E from my Discovery board.
The Discovery board has a 6 pin SWD header and the STM3210E a standard 20-pin JTAG connector. Here are the pinouts as relevant for this adapter:
Naturally, the schematic follows from that map at the bottom:
I happen to have a Fry’s nearby so I just ran out and got the proper 20-pin keyed PCB mount socket, but you could just as easily use naked male header pins.
The finished product – not pretty, but works just fine.
Maybe it is better to use ST-Link/V2 of Nuleo-Board. It is simply to separating.
http://www.st.com/st-web-ui/static/active/en/fragment/product_related/rpn_information/board_photo/nucleo-F4.jpg
I mean, yes, you can break it off, but you still can’t just plug it in to a full 20-pin JTAG header. The adapter is still necessary.
And besides, it’s extremely convenient to have the adapter integrated with the board you’re working on – I don’t plan on snapping apart my Nucleo boards anytime soon.