Skip to main content
Visitor II
April 2, 2023
Solved

how to use jtag in stm32mp157f-dk2

  • April 2, 2023
  • 2 replies
  • 2816 views

stm32mp157f-dk2 is not embedded jtag connector,

but i want to use jtag debugger.

st-link(stm32f103cbt6) embedded in stm32mp157f-dk2 has jtag pin(T_JTCK, T_NRST, T_SWO, T_JTMS)

Q1. Can't I use jtag with only ST-LINK USB CONNECTOR (5 pin)?

Q2. what should I do if I want to use jtag?

0693W00000bhLyaQAE.png​Thank you

    This topic has been closed for replies.
    Best answer by PatrickF

    Hi @SKim.36​ 

    Could you please elaborate why you need to debug using JTAG ?

    Is SWD debug using the embedded STLINK of STM32MP157F-DK2 (CN11 USB) will not workwith your debugger ? We encourage you to use STM32CubeIDE.

    Debugging using JTAG or SWD make no differences (SWD is maybe even slightly faster).

    JTAG is mandatory for thinks like: Boundary scan chain, multiple devices chaining, specific security RMA flow or for internal logic scan. All are useless on this development board.

    If you absolutely need to have a JTAG connector (e.g. to use debugger requiring a specific probe such as Lauterbach Trace32), we recommend to use STM32MP157F-EV1 board which provide natively a JTAG connector.

    Alternatively, you could solder wires on STM32MP157F-DK2 using following Test Point. But this need to be mastered to avoid board damages.

    0693W00000bhNkzQAE.pngRegards,

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

    2 replies

    Visitor II
    April 2, 2023

    Hi there! I'm happy to help you with your question about using JTAG in the STM32MP157F-DK2. My name is Stephen, and I have experience working with JTAG on a variety of embedded systems.

    To answer your first question, it is not possible to use JTAG with only the ST-LINK USB connector. The ST-LINK embedded in the STM32MP157F-DK2 has JTAG pins (T_JTCK, T_NRST, T_SWO, T_JTMS), but they are not connected to the USB connector. In order to use JTAG, you will need to connect to the JTAG pins directly.

    To answer your second question, there are a few options for connecting to JTAG on the STM32MP157F-DK2. One option is to use an external JTAG adapter, such as the J-Link or the ST-LINK/V2. Another option is to use the SWD pins on the ST-LINK to program and debug the device. SWD is a simpler interface than JTAG and is often used on modern microcontrollers.

    When I was working on a project that required JTAG, I had a similar challenge with connecting to the JTAG pins. I was using an STM32 microcontroller with an external JTAG adapter, but the adapter didn't have a connector that matched the pins on the microcontroller. What I ended up doing was creating a custom cable that connected the adapter to the microcontroller. It was a bit of a hassle to make the cable, but it worked well in the end.

    I hope this information helps you with your project. If you have any more questions, feel free to ask!

    SKim.36Author
    Visitor II
    April 3, 2023

    Thank you very much for your help.

    PatrickFAnswer
    Technical Moderator
    April 3, 2023

    Hi @SKim.36​ 

    Could you please elaborate why you need to debug using JTAG ?

    Is SWD debug using the embedded STLINK of STM32MP157F-DK2 (CN11 USB) will not workwith your debugger ? We encourage you to use STM32CubeIDE.

    Debugging using JTAG or SWD make no differences (SWD is maybe even slightly faster).

    JTAG is mandatory for thinks like: Boundary scan chain, multiple devices chaining, specific security RMA flow or for internal logic scan. All are useless on this development board.

    If you absolutely need to have a JTAG connector (e.g. to use debugger requiring a specific probe such as Lauterbach Trace32), we recommend to use STM32MP157F-EV1 board which provide natively a JTAG connector.

    Alternatively, you could solder wires on STM32MP157F-DK2 using following Test Point. But this need to be mastered to avoid board damages.

    0693W00000bhNkzQAE.pngRegards,

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

    SKim.36Author
    Visitor II
    April 3, 2023

    Thank you very much for your help.