| |||
Home > Debug Access Port > SWJ-DP > SWD and JTAG selection mechanism |
SWJ-DP enables one of the following modes to be selected:
JTAG protocol.
Serial Wire Debug protocol.
Dormant.
When in dormant mode, the tms, tdi, and tdo signals can be used for other purposes, enabling other devices connected to the same pins to use alternative debug protocols.
The switcher defaults to JTAG operation on power up reset. Therefore the JTAG protocol can be used from reset without sending a selection sequence.
The SWJ-DP contains a mode status output, jtagnsw, that is HIGH when the SWJ-DP is in JTAG mode and LOW when in SWD or Dormant mode. This signal can be used to:
Disable other TAP controllers when the SWJ-DP is in SWD or dormant mode, for example by disabling tck or forcing tms HIGH.
Multiplex the SWO, traceswo, onto another pin such as tdo when not in JTAG mode.
Another status output, jtagtop, indicates the state of the JTAG-DP TAP controller. The states are:
Test-Logic-Reset.
Run-Test/Idle.
Select-DR-Scan.
Select-IR-Scan.
This signal can be used with jtagnsw to control multiplexers so that, for example, tdo and tdi can be reused as General Purpose Input/Output (GPIO) signals when the device is not in JTAG mode, or during cycles when these signals are not in use by the JTAG-DP TAP controller.
See the ARM® Debug Interface Architecture Specification, ADIv5.0 to ADIv5.2 for information on the SWJ-DP switching sequences.