5.4
SWD interface
The J-Link support ARMs Serial Wire Debug (SWD). SWD replaces the 5-pin JTAG port
with a clock (SWDCLK) and a single bi-directional data pin (SWDIO), providing all the
normal JTAG debug and test functionality. SWDIO and SWCLK are overlaid on the
TMS and TCK pins. In order to communicate with a SWD device, J-Link sends out
data on SWDIO, synchronous to the SWCLK. With every rising edge of SWCLK, one
bit of data is transmitted or received on the SWDIO.
5.4.1
SWO
Serial Wire Output (SWO) support means support for a single pin output signal from
the core. The Instrumentation Trace Macrocell (ITM) and Serial Wire Output (SWO)
can be used to form a Serial Wire Viewer (SWV). The Serial Wire Viewer provides a
low cost method of obtaining information from inside the MCU.
Usually it should not be necessary to configure the SWO speed because this is usually
done by the debugger.
5.4.1.1 Max. SWO speeds
The supported SWO speeds depend on the connected emulator. They can be retrieved
from the emulator. Currently, the following are supported:
Emulator
J-Link V6
J-Link V7/V8
J-Link Pro
Table 5.6: J-Link supported SWO input speeds
5.4.1.2 Configuring SWO speeds
The max. SWO speed in practice is the max. speed which both, target and J-Link can
handle. J-Link can handle the frequencies described in SWO on page 83 whereas the
max. deviation between the target and the J-Link speed is about 3%.
The computation of possible SWO speeds is typically done in the debugger. The SWO
output speed of the CPU is determined by TRACECLKIN, which is normally the same
as the CPU clock.
Example1
Target CPU running at 72 MHz. n is be between 1 and 8192.
Possible SWO output speeds are:
72MHz, 36MHz, 24MHz, ...
J-Link V7: Supported SWO input speeds are: 6MHz / n, n>= 1:
6MHz, 3MHz, 2MHz, 1.5MHz, ...
Permitted combinations are:
SWO output
6MHz, n = 12
3MHz, n = 24
...
2MHz, n = 36
...
Table 5.7: Permitted SWO speed combinations
J-Link / J-Trace (UM08001)
Speed formula
6MHz/n, n >= 12
6MHz/n, n >= 1
6MHz/n, n >= 1
SWO input
6MHz, n = 1
3MHz, n = 2
...
2MHz, n = 3
...
Resulting max. speed
500kHz
6MHz
6MHz
Deviation percent
0
0
<= 3
0
...
© 2004-2009 SEGGER Microcontroller GmbH & Co. KG
83
Need help?
Do you have a question about the J-Link and is the answer not in the manual?
Questions and answers