cancel
Showing results for 
Search instead for 
Did you mean: 

how to use jtag in stm32mp157f-dk2

SKim.36
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

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'

In order 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.

View solution in original post

5 REPLIES 5
SHarr.5
Associate

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!

PatrickF
ST Employee

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'

In order 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.

Thank you very much for your help.

Thank you very much for your help.

I'd like to ask you one more question.

I don't know how to use SWD.

To be more specific, pressed connect in STM32CubeProgrammer, and there is no warning that it is not connected, but it does appear to be connected(As you can see in the picture below).

I want to check the values of a specific address in external SDRAM in that state, what should I do?

0693W00000bhUTgQAM.png