AnsweredAssumed Answered

Is the st-linkv2 SWJ capable?

Question asked by cruz_olivera.ernesto on Nov 27, 2013
Latest reply on Nov 29, 2013 by Andrew Neil
Hello, i'm working with a custom board with a STM32L151RD and a st-linkv2. For debugging purpose i only have access to SWD pins:

But the microcontroller is JTAG wired by default, so my question is:
When i select the SWD protocol on the ST-linkv2 it automatically send the special sequence on the SWDIOTMS pin is used to switch between JTAG-DP and SW-DP?

Explanation from the reference manual:

29.3.1 Mechanism to select the JTAG-DP or the SW-DP
By default, the JTAG-Debug Port is active.
If the debugger host wants to switch to the SW-DP, it must provide a dedicated JTAG
sequence on TMS/TCK (respectively mapped to SWDIO and SWCLK) which disables the
JTAG-DP and enables the SW-DP. This way it is possible to activate the SWDP using only
the SWCLK and SWDIO pins.
This sequence is:
1. Send more than 50 TCK cycles with TMS (SWDIO) =1
2. Send the 16-bit sequence on TMS (SWDIO) = 0111100111100111 (MSB transmitted
3. Send more than 50 TCK cycles with TMS (SWDIO) =1