-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
I'm compiling daplink firmware for STM323F103CB.
Full version with hid+bulk+etc works fine as daplink v2.
When I compiled it without HID to use it as only bulk+cdc then I observe that USB transfer hangs up.
I've found this configuration of DAP_PACKET_SIZE in source code (hic_hal/stm32/stm32f103xb):
/// 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.
#ifndef HID_ENDPOINT //HID end points currently set limits to 64
#define DAP_PACKET_SIZE 512 ///< Specifies Packet Size in bytes.
#else
#define DAP_PACKET_SIZE 64 ///< Specifies Packet Size in bytes.
#endif
STM32F103CB has Full-speed USB so USB packet size should be set to 64B not 512B.
I changed it to 64 and now compiled firmware works.
I think no one found this bug earlier because a full build uses HID, and then the packet size is fortunately set to 64.
Metadata
Metadata
Assignees
Labels
No labels