![]() |
CMSIS-DAP
Version 1.00 - Beta
CMSIS-DAP Interface Firmware for CoreSight Debug Access Port
|
USB Command structure for communication layer 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 Reponse data have a package size limitation that is defined with DAP_PACKET_SIZE. This configureation 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: Reponse 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 occurence. |
| ++++ | The field above has a variable length. |
| ////// | The field above is repeated an 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.
Contents | |
| General Commands | |
| Information and Control commands for the CMSIS-DAP Debug Unit. | |
| Transfer Commands | |
| Control data read and writes to registers. | |
| Common SWD/JTAG Commands | |
| Commands that set the clock and that control and monitor pins. | |
| SWD Commands | |
| Command to configure the SWD protocol. | |
| JTAG Commands | |
| Command to generate JTAG sequences, configure the JTAG chain, read the JTAG IDCODE. | |
| Response Status | |
| Status Information in Reponse Data. | |