ARM-software/CMSIS_5

CMSIS-DAP documentation clarification request

tom-van opened this issue · 2 comments

CMSIS-DAP Commands description reads:

"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."

#define DAP_PACKET_SIZE   ...

is detailed as
"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."

and the chapter Configure USB peripheral adds a relevant note:
"The USB Device setting high-speed / full-speed USB must be reflected in the DAP_config.h file as described under Firmware configuration."

But the comment in DAP_config.h reads about "Typical vales", no strict limit stated.

It's clear that USB HID simply cannot transfer bigger payload than the real packet size, there is no doubt about DAP_PACKET_SIZE.

On the other hand USB bulk has no such limit as it's designed to transfer a payload of virtually any size.

My question is what limits apply to DAP_PACKET_SIZE in case of CMSIS-DAP v2 using USB bulk?
Should be a debugger ready to assemble fragmented IN bulk packets from a debug probe (in case of DAP_PACKET_SIZE > 64 on USB FS and > 512 on USB HS)?

Thanks

"Typical vales", no strict limit stated.

"Typical values" are actually the maximum values and they reflect the maximum USB packet size for specified USB speed (Full/High-speed) and endpoint type (Interrupt Endpoint for HID and Bulk Endpoint for WinUSB).

My question is what limits apply to DAP_PACKET_SIZE in case of CMSIS-DAP v2 using USB bulk?

DAP_PACKET_SIZE is still limited to the USB bulk endpoint maximum USB packet size: 64 on USB FS and 512 on USB HS.
CMSIS-DAP framework currently cannot cope with larger DAP_PACKET_SIZE.

Thanks