24.10.2012 Views

J-Link / J-Trace User Guide (UM08001) - Microcontrollers

J-Link / J-Trace User Guide (UM08001) - Microcontrollers

J-Link / J-Trace User Guide (UM08001) - Microcontrollers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.4 SWD interface<br />

The J-<strong>Link</strong> support ARMs Serial Wire Debug (SWD). SWD replaces the 5-pin JTAG port<br />

with a clock (SWDCLK) and a single bi-directional data pin (SWDIO), providing all the<br />

normal JTAG debug and test functionality. SWDIO and SWCLK are overlaid on the<br />

TMS and TCK pins. In order to communicate with a SWD device, J-<strong>Link</strong> sends out<br />

data on SWDIO, synchronous to the SWCLK. With every rising edge of SWCLK, one<br />

bit of data is transmitted or received on the SWDIO.<br />

5.4.1 SWD speed<br />

Currently only fixed SWD speed is supported by J-<strong>Link</strong>. The target is clocked at a<br />

fixed clock speed. The SWD speed which is used for target communication should not<br />

exceed target CPU speed * 10. The maximum SWD speed which is supported by J-<br />

<strong>Link</strong> depends on the hardware version and model of J-<strong>Link</strong>. For more information<br />

about the maximum SWD speed for each J-<strong>Link</strong> / J-<strong>Trace</strong> model, please refer to J-<br />

<strong>Link</strong> / J-<strong>Trace</strong> models on page 20.<br />

5.4.2 SWO<br />

Serial Wire Output (SWO) support means support for a single pin output signal from<br />

the core. The Instrumentation <strong>Trace</strong> Macrocell (ITM) and Serial Wire Output (SWO)<br />

can be used to form a Serial Wire Viewer (SWV). The Serial Wire Viewer provides a<br />

low cost method of obtaining information from inside the MCU.<br />

Usually it should not be necessary to configure the SWO speed because this is usually<br />

done by the debugger.<br />

5.4.2.1 Max. SWO speeds<br />

The supported SWO speeds depend on the connected emulator. They can be retrieved<br />

from the emulator. Currently, the following are supported:<br />

Emulator Speed formula Resulting max. speed<br />

J-<strong>Link</strong> V6 6MHz/n, n >= 12 500kHz<br />

J-<strong>Link</strong> V7/V8 6MHz/n, n >= 1 6MHz<br />

J-<strong>Link</strong> Pro 6MHz/n, n >= 1 6MHz<br />

Table 5.6: J-<strong>Link</strong> supported SWO input speeds<br />

5.4.2.2 Configuring SWO speeds<br />

The max. SWO speed in practice is the max. speed which both, target and J-<strong>Link</strong> can<br />

handle. J-<strong>Link</strong> can handle the frequencies described in SWO on page 97 whereas the<br />

max. deviation between the target and the J-<strong>Link</strong> speed is about 3%.<br />

The computation of possible SWO speeds is typically done in the debugger. The SWO<br />

output speed of the CPU is determined by TRACECLKIN, which is normally the same<br />

as the CPU clock.<br />

Example1<br />

Target CPU running at 72 MHz. n is be between 1 and 8192.<br />

Possible SWO output speeds are:<br />

72MHz, 36MHz, 24MHz, ...<br />

J-<strong>Link</strong> V7: Supported SWO input speeds are: 6MHz / n, n>= 1:<br />

6MHz, 3MHz, 2MHz, 1.5MHz, ...<br />

J-<strong>Link</strong> / J-<strong>Trace</strong> (<strong>UM08001</strong>) © 2004-2010 SEGGER Microcontroller GmbH & Co. KG<br />

97

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!