cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R5 debug port hardware connection

CYeow.1
Associate II

Hi, I'm trying to design the STM32L4R5 IC on my PCB board and use the STLink V2 as the debugger.

  1. Should I use the SWJ or SWD debug port options? What are the pros and cons for both?
  2. Since the STLink V2 is a 20 pin JTAG connector, how do I connect the 20 pin debugger to my board if I'm only using the SWD debug port with only 5 pins (Vdd, GND, SWDIO, SWCLK, NRST) needed? Like do I need a custom cable or?

Thanks.

2 REPLIES 2

You can implement any choices you want.

For a singular device on the board, and no boundary scan needs, you likely don't need JTAG

ARM also has a denser 10-pin connector that people have migrated too these days, but the 20-pin might be easier, depends on available board space, etc. Tag-Connect is also popular.

I would use SWDIO, SWCLK, SWO, NRST and GND. Having a VTarget supply for the buffers on the pod can be helpful. Access to a UART and BOOT0 might also be helpful.

Are custom cables, pin headers or test points a problem for you, I don't really know.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Amel NASRI
ST Employee

Hi @CYeow.1​ ,

In order to answer the "How to connect debug port on STM32L4R5?" question, you can refer to the application note AN4555 Getting started with STM32L4 Series and STM32L4+ Series hardware development.

The answer can be found in the section Debug management.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.