CMSIS-DAP  Version 2.1.2
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_DRIVER   0
 USART Driver instance number for the UART SWO. 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 DAP_UART   1
 Indicate that UART Communication Port is available. This information is returned by the command DAP_Info as part of Capabilities. More...
 
#define DAP_UART_DRIVER   1
 USART Driver instance number for the UART Communication Port. More...
 
#define DAP_UART_RX_BUFFER_SIZE   1024U
 UART Receive Buffer Size. More...
 
#define DAP_UART_TX_BUFFER_SIZE   1024U
 UART Transmit Buffer Size. More...
 
#define DAP_UART_USB_COM_PORT   1
 Indicate that UART Communication via USB COM Port is available. This information is returned by the command DAP_Info as part of Capabilities. More...
 
#define TARGET_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, Device Name, Board Vendor and Board Name strings are stored and may be used by the debugger or IDE to configure device parameters. More...
 
#define TARGET_DEVICE_VENDOR   "Arm"
 String indicating the Silicon Vendor.
 
#define TARGET_DEVICE_NAME   "Cortex-M"
 String indicating the Target Device.
 
#define TARGET_BOARD_VENDOR   "Arm"
 String indicating the Board Vendor.
 
#define TARGET_BOARD_NAME   "Arm board"
 String indicating the Board Name.
 

Functions

__STATIC_INLINE uint8_t DAP_GetVendorString (char *str)
 Get Vendor Name string. More...
 
__STATIC_INLINE uint8_t DAP_GetProductString (char *str)
 Get Product Name string. More...
 
__STATIC_INLINE uint8_t DAP_GetSerNumString (char *str)
 Get Serial Number string. More...
 
__STATIC_INLINE uint8_t DAP_GetTargetDeviceVendorString (char *str)
 Get Target Device Vendor string. More...
 
__STATIC_INLINE uint8_t DAP_GetTargetDeviceNameString (char *str)
 Get Target Device Name string. More...
 
__STATIC_INLINE uint8_t DAP_GetTargetBoardVendorString (char *str)
 Get Target Board Vendor string. More...
 
__STATIC_INLINE uint8_t DAP_GetTargetBoardNameString (char *str)
 Get Target Board Name string. More...
 
__STATIC_INLINE uint8_t DAP_GetProductFirmwareVersionString (char *str)
 Get Product Firmware Version 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 DAP_UART   1

Indicate that UART Communication Port is available. This information is returned by the command DAP_Info as part of Capabilities.

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

#define DAP_UART_DRIVER   1

USART Driver instance number for the UART Communication Port.

USART Driver instance number (Driver_USART#).

#define DAP_UART_RX_BUFFER_SIZE   1024U

UART Receive Buffer Size.

Uart Receive Buffer Size in bytes (must be 2^n).

#define DAP_UART_TX_BUFFER_SIZE   1024U

UART Transmit Buffer Size.

Uart Transmit Buffer Size in bytes (must be 2^n).

#define DAP_UART_USB_COM_PORT   1

Indicate that UART Communication via USB COM Port is available. This information is returned by the command DAP_Info as part of Capabilities.

USB COM Port: 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_DRIVER   0

USART Driver instance number for the UART SWO.

USART Driver instance number (Driver_USART#).

#define SWO_UART_MAX_BAUDRATE   10000000U

Maximum SWO UART Baudrate.

SWO UART Maximum Baudrate in Hz.

#define TARGET_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, Device Name, Board Vendor and Board Name strings are stored and may be used by the debugger or IDE to configure device parameters.

Target: 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_GetProductFirmwareVersionString ( char *  str)

Get Product Firmware Version string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).
__STATIC_INLINE uint8_t DAP_GetProductString ( char *  str)

Get Product Name string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).
__STATIC_INLINE uint8_t DAP_GetSerNumString ( char *  str)

Get Serial Number string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).
__STATIC_INLINE uint8_t DAP_GetTargetBoardNameString ( char *  str)

Get Target Board Name string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).
__STATIC_INLINE uint8_t DAP_GetTargetBoardVendorString ( char *  str)

Get Target Board Vendor string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).
__STATIC_INLINE uint8_t DAP_GetTargetDeviceNameString ( char *  str)

Get Target Device Name string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).
__STATIC_INLINE uint8_t DAP_GetTargetDeviceVendorString ( char *  str)

Get Target Device Vendor string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).
__STATIC_INLINE uint8_t DAP_GetVendorString ( char *  str)

Get Vendor Name string.

Parameters
strPointer to buffer to store the string (max 60 characters).
Returns
String length (including terminating NULL character) or 0 (no string).