Skip to main content
Visitor II
April 22, 2021
Question

STM32L4R5 debug port hardware connection

  • April 22, 2021
  • 2 replies
  • 1005 views

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.

    This topic has been closed for replies.

    2 replies

    Graduate II
    April 22, 2021

    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.

    Technical Moderator
    April 27, 2021

    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