top of page
Writer's pictureSunil Kumar Yadav

What is Serial Wire Debug?

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.


Image 1: SWD Interface

The physical layer of SWD consists of two lines

  • SWDIO: a bidirectional data line

  • SWCLK: a clock driver by the host


Image 2: Timing diagram

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.


658 views0 comments

Recent Posts

See All

コメント


bottom of page