Commands between a CMSIS-DAP debug probe and a 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. | |
UART COM Commands | |
Target communication via extra UART. | |
Response Status | |
Status Information in Response Data. | |
This section explains each command that is exchanged between the CMSIS-DAP compliant Debug probe 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.
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 (low byte first). |
WORD | 32-bit value (low byte first). |
LWORD | 64-bit value (low byte first). |
FLOAT | 32-bit single precision floating point value (LSB first). |
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:
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.