CMSIS-DAP  
Interface Firmware for CoreSight Debug Access Port
 
Loading...
Searching...
No Matches
CMSIS-DAP Debug Unit Information

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.
 
#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.
 
#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.
 
#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.
 
#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.
 
#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.
 
#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.
 
#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.
 
#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).
 
#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.
 
#define SWO_UART_DRIVER   0
 USART Driver instance number for the UART SWO.
 
#define SWO_UART_MAX_BAUDRATE   10000000U
 Maximum SWO UART Baudrate.
 
#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.
 
#define SWO_BUFFER_SIZE   4096U
 SWO Trace Buffer Size.
 
#define SWO_STREAM   0
 SWO Streaming Trace.
 
#define TIMESTAMP_CLOCK   100000000U
 Clock frequency of the Test Domain Timer. Timer value is returned with TIMESTAMP_GET.
 
#define DAP_UART   1
 Indicate that UART Communication Port is available. This information is returned by the command DAP_Info as part of Capabilities.
 
#define DAP_UART_DRIVER   1
 USART Driver instance number for the UART Communication Port.
 
#define DAP_UART_RX_BUFFER_SIZE   1024U
 UART Receive Buffer Size.
 
#define DAP_UART_TX_BUFFER_SIZE   1024U
 UART Transmit Buffer Size.
 
#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.
 
#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.
 
#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)
 
__STATIC_INLINE uint8_t DAP_GetProductString (char *str)
 
__STATIC_INLINE uint8_t DAP_GetSerNumString (char *str)
 
__STATIC_INLINE uint8_t DAP_GetTargetDeviceVendorString (char *str)
 
__STATIC_INLINE uint8_t DAP_GetTargetDeviceNameString (char *str)
 
__STATIC_INLINE uint8_t DAP_GetTargetBoardVendorString (char *str)
 
__STATIC_INLINE uint8_t DAP_GetTargetBoardNameString (char *str)
 
__STATIC_INLINE uint8_t DAP_GetProductFirmwareVersionString (char *str)
 

Description

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

This information includes:

Macro Definition Documentation

◆ CPU_CLOCK

#define CPU_CLOCK   100000000U

Specifies the CPU Clock in Hz.

◆ DAP_DEFAULT_PORT

#define DAP_DEFAULT_PORT   1U

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

◆ DAP_DEFAULT_SWJ_CLOCK

#define DAP_DEFAULT_SWJ_CLOCK   1000000U

Default SWD/JTAG clock frequency in Hz.

◆ DAP_JTAG

#define DAP_JTAG   1

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

◆ DAP_JTAG_DEV_CNT

#define DAP_JTAG_DEV_CNT   8U

Maximum number of JTAG devices on scan chain.

◆ DAP_PACKET_COUNT

#define DAP_PACKET_COUNT   8U

Specifies number of packets buffered.

◆ DAP_PACKET_SIZE

#define DAP_PACKET_SIZE   512U

Specifies Packet Size in bytes.

◆ DAP_SWD

#define DAP_SWD   1

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

◆ DAP_UART

#define DAP_UART   1

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

◆ DAP_UART_DRIVER

#define DAP_UART_DRIVER   1

USART Driver instance number (Driver_USART#).

◆ DAP_UART_RX_BUFFER_SIZE

#define DAP_UART_RX_BUFFER_SIZE   1024U

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

◆ DAP_UART_TX_BUFFER_SIZE

#define DAP_UART_TX_BUFFER_SIZE   1024U

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

◆ DAP_UART_USB_COM_PORT

#define DAP_UART_USB_COM_PORT   1

USB COM Port: 1 = available, 0 = not available.

◆ IO_PORT_WRITE_CYCLES

#define IO_PORT_WRITE_CYCLES   2U

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

◆ SWO_BUFFER_SIZE

#define SWO_BUFFER_SIZE   4096U

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

◆ SWO_MANCHESTER

#define SWO_MANCHESTER   0

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

◆ SWO_STREAM

#define SWO_STREAM   0

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

◆ SWO_UART

#define SWO_UART   1

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

◆ SWO_UART_DRIVER

#define SWO_UART_DRIVER   0

USART Driver instance number (Driver_USART#).

◆ SWO_UART_MAX_BAUDRATE

#define SWO_UART_MAX_BAUDRATE   10000000U

SWO UART Maximum Baudrate in Hz.

◆ TARGET_BOARD_NAME

#define TARGET_BOARD_NAME   "Arm board"

◆ TARGET_BOARD_VENDOR

#define TARGET_BOARD_VENDOR   "Arm"

◆ TARGET_DEVICE_NAME

#define TARGET_DEVICE_NAME   "Cortex-M"

◆ TARGET_DEVICE_VENDOR

#define TARGET_DEVICE_VENDOR   "Arm"

◆ TARGET_FIXED

#define TARGET_FIXED   0

Target: 1 = known, 0 = unknown;

◆ TIMESTAMP_CLOCK

#define TIMESTAMP_CLOCK   100000000U

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

Function Documentation

◆ DAP_GetProductFirmwareVersionString()

__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).

◆ DAP_GetProductString()

__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).

◆ DAP_GetSerNumString()

__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).

◆ DAP_GetTargetBoardNameString()

__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).

◆ DAP_GetTargetBoardVendorString()

__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).

◆ DAP_GetTargetDeviceNameString()

__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).

◆ DAP_GetTargetDeviceVendorString()

__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).

◆ DAP_GetVendorString()

__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).