cancel
Showing results for 
Search instead for 
Did you mean: 

SWD (Serial Wire Debug) with ST-LINK ?

jcrepetto
Associate II
Posted on December 27, 2009 at 16:45

SWD (Serial Wire Debug) with ST-LINK ?

7 REPLIES 7
jcrepetto
Associate II
Posted on May 17, 2011 at 13:35

Hello,

I have received my ST-LINK this morning, and I am wondering if it can work in SWD mode. I have tested it with the Keil and Atollic debuggers, but I can't find any configuration dialog box for the ST-LINK debug mode. Moreover, when the STM32F103ZE target is flashed with an application using the SPI3, neither GDB nor the Keil debugger can connect to the JTAG port.

Jean-Claude

st3
Associate II
Posted on May 17, 2011 at 13:35

Cross-post:

http://www.keil.com/forum/docs/thread16147.asp

janvi
Associate II
Posted on May 17, 2011 at 13:35

While JTAG works fine, I also failed with the ''free'' atollic version for serial debug. Obviously, the ST-Link uses the same 20 pin flat cable like other download cables. If you compare with the Segger J-link, you will find very diffrent pin assignment for the 20 pin connector while others (Hitex) do not have any descriptions inside there manuals. Segger uses even pin 4-20 as ground pairs, while the ST-Link shows the ''SWIM'' connections there.

As far as I can read in the STM32 data sheet, serial wire debug requires both, SWCLK and SWDIO for synchronous half duplex serial communication while the STM8 has a SWIM pin what is something completely diffrent. Therefore probably the truth is, that the ST-link always requires complete jtag and cannot support even the slowest software driven serial debug for the STM32.

adrian239955_stm1_st
Associate II
Posted on May 17, 2011 at 13:35

Just wondering, is the ST-Link working with SWD for 32-bit now? Can't find much discussion or product info to answer this question.

EDIT

Result! Despite the Atollic website telling me that SWD isn't supported by the Lite version I installed it anyway (seeing as it seemed to be the least crippled free IDE) and it appears to work. I thought I'd be stuck with 5-wire JTAG but this is a bonus. The ST-Link firmware updater has to be run to install the latest version (download from the ST site or as included with TrueSTUDIO) but then, when creating a project with the wizard the SWD tick-box can be selected instead of JTAG.

Initially I connected power and all five JTAG connections to my target STM32F103RB and verified that I could conduct a standard JTAG debug session. After that I disconnected three of the wires leaving both SWIO (PA13) and SWCLK (PA14) connected. The micro datasheet explains how these two signals are used to override normal JTAG debug so I guessed they'd both be required. Note that these connections can't be made to ST-Link using the 10-way flying lead set or 4-way SWIM lead though, as this isn't SWIM.

janvi
Associate II
Posted on May 17, 2011 at 13:35

The November 09 Version 3 manual for ST-Link indicates

''Atollic and SWD support'' but situation is further unclear.

With self made cable what connects SWDIO and SWCLK, the

COM Led at the ST-Link is illuminated, but GDB server exits

wiesendanger
Associate
Posted on May 17, 2011 at 13:35

I asked atollic about SWD support - here's their answer:

The current version of TrueSTUDIO/STM32 has not support for SWD as it is not yet supported by our ST-LINK gdbserver. The reason is that SWD was not supported by the original ST-LINK JTAG device.

However we have an updated beta version of the ST-LINK gdbserver now with SWD support that will be included in the next version of TrueSTUDIO. This require a firmware update of the sw in the ST-LINK JTAG device that we also will include in next TrueSTUDIO.

Currently we only deliver this beta version of ST-LINK gdbserver to TrueSTUDIO PRO customers.

Regarding JLINK the Segger gdbServer has a monitor command that shall be used to select SWD operation mode.

Kind regards,

Atollic support

ersan
Associate II
Posted on May 17, 2011 at 13:35

I got stuck too.

I have an inemo v2 Board (STM32F103RE) and a ST-Link. I want access the inemo v2 Board via the ST-Link. Im using the SWD/JTAG Adapter from the iNemo V2 Board. But i cant establish a connection i always get ''no Target connected'' :(

I need to up and download firmware to the iNemoV2 STM32F103RE chip but its not working :(

I'cant use USB /DFU Mode i must use the SWD Header on the STM32F103

regards

Ersan