CMSIS-DAP  Version 2.0.0
Interface Firmware for CoreSight Debug Access Port
 All Functions Groups Pages
CMSIS-DAP Debug Unit Information

Provides definitions about the hardware and configuration of the Debug Unit. More...

Macros

#define CPU_CLOCK   100000000U
 Processor Clock of the Cortex-M MCU used in the Debug Unit. This value is used to calculate the SWD/JTAG clock speed. More...
 
#define IO_PORT_WRITE_CYCLES   2U
 Number of processor cycles for I/O Port write operations. This value is used to calculate the SWD/JTAG clock speed that is generated with I/O Port write operations in the Debug Unit by a Cortex-M MCU. Most Cortex-M processors require 2 processor cycles for a I/O Port Write operation. If the Debug Unit uses a Cortex-M0+ processor with high-speed peripheral I/O only 1 processor cycle might be required. More...
 
#define DAP_SWD   1
 Indicate that Serial Wire Debug (SWD) communication mode is available at the Debug Access Port. This information is returned by the command DAP_Info as part of Capabilities. More...
 
#define DAP_JTAG   1
 Indicate that JTAG communication mode is available at the Debug Port. This information is returned by the command DAP_Info as part of Capabilities. More...
 
#define DAP_JTAG_DEV_CNT   8U
 Configure maximum number of JTAG devices on the scan chain connected to the Debug Access Port. This setting impacts the RAM requirements of the Debug Unit. Valid range is 1 .. 255. More...
 
#define DAP_DEFAULT_PORT   1U
 Default communication mode on the Debug Access Port. Used for the command DAP_Connect when Port Default mode is selected. More...
 
#define DAP_DEFAULT_SWJ_CLOCK   1000000U
 Default communication speed on the Debug Access Port for SWD and JTAG mode. Used to initialize the default SWD/JTAG clock frequency. The command DAP_SWJ_Clock can be used to overwrite this default setting. More...
 
#define DAP_PACKET_SIZE   512U
 Maximum Package Size for Command and Response data. This configuration settings is used to optimize the communication performance with the debugger and depends on the USB peripheral. Typical vales are 64 for Full-speed USB HID or WinUSB, 1024 for High-speed USB HID and 512 for High-speed USB WinUSB. More...
 
#define DAP_PACKET_COUNT   8U
 Maximum Package Buffers for Command and Response data. This configuration settings is used to optimize the communication performance with the debugger and depends on the USB peripheral. For devices with limited RAM or USB buffer the setting can be reduced (valid range is 1 .. 255). More...
 
#define SWO_UART   1
 Indicate that UART Serial Wire Output (SWO) trace is available. This information is returned by the command DAP_Info as part of Capabilities. More...
 
#define SWO_UART_MAX_BAUDRATE   10000000U
 Maximum SWO UART Baudrate. More...
 
#define SWO_MANCHESTER   0
 Indicate that Manchester Serial Wire Output (SWO) trace is available. This information is returned by the command DAP_Info as part of Capabilities. More...
 
#define SWO_BUFFER_SIZE   4096U
 SWO Trace Buffer Size. More...
 
#define SWO_STREAM   0
 SWO Streaming Trace. More...
 
#define TIMESTAMP_CLOCK   100000000U
 Clock frequency of the Test Domain Timer. Timer value is returned with TIMESTAMP_GET. More...
 
#define TARGET_DEVICE_FIXED   0
 Debug Unit is connected to fixed Target Device. The Debug Unit may be part of an evaluation board and always connected to a fixed known device. In this case a Device Vendor and Device Name string is stored which may be used by the debugger or IDE to configure device parameters. More...
 

Functions

__STATIC_INLINE uint8_t DAP_GetVendorString (char *str)
 Get Vendor ID string. More...
 
__STATIC_INLINE uint8_t DAP_GetProductString (char *str)
 Get Product ID string. More...
 
__STATIC_INLINE uint8_t DAP_GetSerNumString (char *str)
 Get Serial Number string. More...
 

Description

Provides definitions about the hardware and configuration of the Debug Unit.

This information includes:

Macro Definition Documentation

#define CPU_CLOCK   100000000U

Processor Clock of the Cortex-M MCU used in the Debug Unit. This value is used to calculate the SWD/JTAG clock speed.

Specifies the CPU Clock in Hz.

#define DAP_DEFAULT_PORT   1U

Default communication mode on the Debug Access Port. Used for the command DAP_Connect when Port Default mode is selected.

Default JTAG/SWJ Port Mode: 1 = SWD, 2 = JTAG.

#define DAP_DEFAULT_SWJ_CLOCK   1000000U

Default communication speed on the Debug Access Port for SWD and JTAG mode. Used to initialize the default SWD/JTAG clock frequency. The command DAP_SWJ_Clock can be used to overwrite this default setting.

Default SWD/JTAG clock frequency in Hz.

#define DAP_JTAG   1

Indicate that JTAG communication mode is available at the Debug Port. This information is returned by the command DAP_Info as part of Capabilities.

JTAG Mode: 1 = available, 0 = not available.

#define DAP_JTAG_DEV_CNT   8U

Configure maximum number of JTAG devices on the scan chain connected to the Debug Access Port. This setting impacts the RAM requirements of the Debug Unit. Valid range is 1 .. 255.

Maximum number of JTAG devices on scan chain.

#define DAP_PACKET_COUNT   8U

Maximum Package Buffers for Command and Response data. This configuration settings is used to optimize the communication performance with the debugger and depends on the USB peripheral. For devices with limited RAM or USB buffer the setting can be reduced (valid range is 1 .. 255).

Specifies number of packets buffered.

#define DAP_PACKET_SIZE   512U

Maximum Package Size for Command and Response data. This configuration settings is used to optimize the communication performance with the debugger and depends on the USB peripheral. Typical vales are 64 for Full-speed USB HID or WinUSB, 1024 for High-speed USB HID and 512 for High-speed USB WinUSB.

Specifies Packet Size in bytes.

#define DAP_SWD   1

Indicate that Serial Wire Debug (SWD) communication mode is available at the Debug Access Port. This information is returned by the command DAP_Info as part of Capabilities.

SWD Mode: 1 = available, 0 = not available.

#define IO_PORT_WRITE_CYCLES   2U

Number of processor cycles for I/O Port write operations. This value is used to calculate the SWD/JTAG clock speed that is generated with I/O Port write operations in the Debug Unit by a Cortex-M MCU. Most Cortex-M processors require 2 processor cycles for a I/O Port Write operation. If the Debug Unit uses a Cortex-M0+ processor with high-speed peripheral I/O only 1 processor cycle might be required.

I/O Cycles: 2=default, 1=Cortex-M0+ fast I/0.

#define SWO_BUFFER_SIZE   4096U

SWO Trace Buffer Size.

SWO Trace Buffer Size in bytes (must be 2^n).

#define SWO_MANCHESTER   0

Indicate that Manchester Serial Wire Output (SWO) trace is available. This information is returned by the command DAP_Info as part of Capabilities.

SWO Manchester: 1 = available, 0 = not available.

#define SWO_STREAM   0

SWO Streaming Trace.

SWO Streaming Trace: 1 = available, 0 = not available.

#define SWO_UART   1

Indicate that UART Serial Wire Output (SWO) trace is available. This information is returned by the command DAP_Info as part of Capabilities.

SWO UART: 1 = available, 0 = not available.

#define SWO_UART_MAX_BAUDRATE   10000000U

Maximum SWO UART Baudrate.

SWO UART Maximum Baudrate in Hz.

#define TARGET_DEVICE_FIXED   0

Debug Unit is connected to fixed Target Device. The Debug Unit may be part of an evaluation board and always connected to a fixed known device. In this case a Device Vendor and Device Name string is stored which may be used by the debugger or IDE to configure device parameters.

Target Device: 1 = known, 0 = unknown;

#define TIMESTAMP_CLOCK   100000000U

Clock frequency of the Test Domain Timer. Timer value is returned with TIMESTAMP_GET.

Timestamp clock in Hz (0 = timestamps not supported).

Function Documentation

__STATIC_INLINE uint8_t DAP_GetProductString ( char *  str)

Get Product ID string.

Parameters
strPointer to buffer to store the string.
Returns
String length.
__STATIC_INLINE uint8_t DAP_GetSerNumString ( char *  str)

Get Serial Number string.

Parameters
strPointer to buffer to store the string.
Returns
String length.
__STATIC_INLINE uint8_t DAP_GetVendorString ( char *  str)

Get Vendor ID string.

Parameters
strPointer to buffer to store the string.
Returns
String length.