CMSIS-DAP  Version 1.1.0
Interface Firmware for CoreSight Debug Access Port
 All Functions Groups Pages
CMSIS-DAP Commands

Commands between Debug Unit and host computer. More...

Content

 General Commands
 Information and Control commands for the CMSIS-DAP Debug Unit.
 
 Common SWD/JTAG Commands
 Set SWD/JTAG clock and control/monitor SWD/JTAG I/O pins.
 
 SWD Commands
 Configure the parameters for SWD mode.
 
 SWO Commands
 Configure the parameters for SWO mode.
 
 JTAG Commands
 Detect and configure the JTAG device chain.
 
 Transfer Commands
 Read and Writes to CoreSight registers.
 
 Atomic Commands
 Execute atomic commands.
 
 Response Status
 Status Information in Response Data.
 

Description

Commands between Debug Unit and host computer.

This section explains each command that is exchanged between the Debug Unit and the host computer. Every Command starts with a Command-ID and optional data. Depending on the Command, the CMSIS-DAP firmware replies with a Response that repeats the Command-ID and delivers additional data.

Command and Response data have a package size limitation that is defined with DAP_PACKET_SIZE. This configuration setting can be obtained with the command DAP_Info and is used to optimize the performance for Full-Speed or High-Speed USB. The debugger must ensure that each data package fits within the limitations of the configured DAP_PACKET_SIZE.

Conventions and Command Structure

The following conventions describe the command semantic used in the following documentation:

Symbol Description
> Prefix indicating the direction: Command from host to Debug Unit.
< Prefix indicating the direction: Response from Debug Unit to host.
BYTE 8-bit value.
SHORT 16-bit value.
WORD 32-bit value.
0x01 Fixed HEX value in C notation. Used for example to identify a command.
Reserved The field above is reserved for future extension.
**** The field above has exactly one occurrence.
++++ The field above has a variable length.
////// The field above is repeated and may appear 0..n times.

The commands are described in a structure consisting of three lines.

Examples:

BYTE | SHORT *| WORD ***|
> 0x99 | RecLen | Data |
******|********|+++++++++|

The Command with the Command-ID 0x99 is sent from the host computer to the Debug Unit. The value of RecLen indicates the number of WORDS that follow with Data. Data is repeated several times depending on the value of RecLen.

Depending on the Command the Debug Unit may send a Response.

BYTE ***| WORD***********|
< 0 | Register Value |
*Reserved|****************|