CMSIS-DAP: DAP_SWJ_Pins

| CMSIS-DAP Version 1.2.0 (Proposal) Interface Firmware for CoreSight Debug Access Port

- Main Page
- Usage and Description
- Reference

All Functions Groups Pages
DAP_SWJ_Pins
Common SWD/JTAG Commands

Control and monitor SWD/JTAG Pins. More...

Control and monitor SWD/JTAG Pins.

The DAP_SWJ_Pins Command is used to monitor and control the I/O Pins including the nRESET Device reset line.

The Pin Wait time is useful in systems where the nRESET pin is implemented as open-drain output. After nRESET is de-asserted by the debugger, external circuit may still hold the target Device under reset for a time. Using the Pin Wait time, the debugger may monitor selected I/O Pins and wait until they the expected value appears or a timeout expires.

I/O Pin Mapping for the fields Pin Output, Pin Select, and Pin Input:

- Bit 0: SWCLK/TCK
- Bit 1: SWDIO/TMS
- Bit 2: TDI
- Bit 3: TDO
- Bit 5: nTRST
- Bit 7: nRESET

DAP_SWJ_Pins Command:

| BYTE | BYTE ******| BYTE ******| Word ****|
> 0x10 | Pin Output | Pin Select | Pin Wait |
|******|************|************|**********|

- Pin Output: Value for selected output pins
- Pin Select: Selects which output pins will be modified
- Pin Wait: Wait timeout for the selected output to stabilize
  - 0 = no wait
  - 1 .. 3000000 = time in µs (max 3s)

DAP_SWJ_Pins Response:

| BYTE | BYTE *****|
< 0x10 | Pin Input |
|******|***********|

- Pin Input: Pin state read from target Device.