Serial Wire Debug (SWD) is a lightweight debug protocol from ARM. Unlike traditional JTAG which required 5-pin, SWD required only 2-pin and provides all the normal JTAG debug and test functionality. SWD is mainly used with low-cost MCU like cortex-m series. Unlike JTAG, daisy-chaining devices are not possible with SWD.
Serial Wire Debug is part of Arm DebugInterface Specification v5 and is an alternative to JTAG. This enables the debugger to become another AMBA bus master for access to system memory and peripheral or debug registers.
The physical layer of SWD consists of two lines
SWDIO: a bidirectional data line
SWCLK: a clock driver by the host
In order to communicate with a device via SWD, data is sent on SWDIO, synchronous to the SWCLK. With every rising edge of SWCLK, one bit of data is transmitted or received on the SWDIO pin. More detailed information on the timing diagram and protocol could be found at this link.
コメント