cancel
Showing results for 
Search instead for 
Did you mean: 

Is the st-linkv2 SWJ capable?

ecruzolivera
Associate
Posted on November 27, 2013 at 22:14

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:

SWCLK (PA14) 

SWDIO (PA13)

TRACESWO (PB3)

NRST

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

first)

3. Send more than 50 TCK cycles with TMS (SWDIO) =1

#cross-post
3 REPLIES 3
Posted on November 28, 2013 at 02:25

Yes, only needs these pins (and ground) for SWD/SWV connectivity, this is how the Discovery boards work. JTAG mode will not be viable unless you have it's full complement of pins.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ecruzolivera
Associate
Posted on November 28, 2013 at 16:00

Thanks for the reply

Regards

Posted on November 29, 2013 at 19:43

Now update your cross-post on the Keil forum to note that the question is answered:

http://www.keil.com/forum/24337/