As there is no relation between the processor clock and the SWD clock, the frequency selection is up to the host interface. This AP allows to connect a JTAG chain to the DAP.Īs said earlier, SWD uses only two signals : This AP provides access to the core memory aand registers. ARM provides specifications for two APs : Multiple APs can be added to the DAP, depending on the needs. A specific sequence has to be sent in order to switch from one interface to the other. It reuses the TMS and TCK JTAG signals to transfer the SWDIO and SWDCLK signals respectively. This is a common interface found on many microcontrollers. This port can use either JTAG or SWD to access the DAP.
This port uses the SWD protocol to access the DAP. This port uses the standard JTAG interface and protocol to access the DAP There are three different Debug Ports available to access the DAP : The Debug Port is the interface between the host and the DAP. This whitepaper from ARM shows a nice overview of the SWD architecture : To sum this up, an external debugger connects to the DAP via the DP using a protocol called SWD. The DP communicates with the APs using packets that contain the AP address. On this DAP, there is one master (the DP – Debug Port) and one or more slaves ( AP – Access Ports), similar to JTAG TAPs. ARM Debug Interface Architecture OverviewĬontrary to JTAG, which chains TAPs together, SWD uses a bus called DAP (Debug Access Port). This interface and its associated protocol are now available in nearly all Cortex- processors.
To address this, ARM created an alternative debug interface called SWD (Serial Wire Debug) that only uses two signals (SWDCLK and SWDIO). This has become a problem now that devices have gotten smaller and smaller and low pin count microcontrollers are available. Its main drawback is that it uses a lot of signals to work (at least 4 – TCK, TMS, TDI, TDO). This protocol has been in use for many years and is still in use today. For embedded developers and hardware hackers, JTAG is the de facto standard for debugging and accessing microprocessor registers.