alambe94 / I-CUBE-USBD-Composite

Create STM32 USB Composite devices with ease.
MIT License
142 stars 30 forks source link

KEYBOARD_HID_BUSY after HID_KEYBOARD_EPIN_SIZE > 0x10 [16] using usb FS #34

Open russeree opened 7 months ago

russeree commented 7 months ago

First thank you to everyone that has contributed to this library.

I am developing a USB 2.0 High Speed HID + CDC keyboard. The use of USB HS should allow me to send up a 1024 byte interrupt packet. My current report only requires 62 bytes for NKRO as such I would like to send the entire packet once per bInterval period. To do this my strategy was to increase the HID_KEYBOARD_EPIN_SIZE to 128 bytes and it does show up on my lsusb as having wMaxPacketSize of 1x128 bytes. The problem I am having is anything over 16 bytes for the HID_KEYBOARD_EPIN_SIZE never completes a transfer and the state of the HID device remains KEYBOARD_HID_BUSY and the USBD_HID_DataIn is never called.

I have been banging my head against the wall for 2 days trying to figure out what setting or buffer setup needs to be modified so that my transfer complete successfully.

Edit: Disabling the USB CDC devices seems to have no impact.

Here is my source code https://github.com/russeree/nyan-keys-stm32-firmware

Descriptors and such are here - Using my NKRO branch https://github.com/russeree/nyan-keys-stm32-firmware/blob/nkro-keys/Middlewares/Third_Party/AL94_USB_Composite/COMPOSITE/Class/HID_KEYBOARD/Src/usbd_hid_keyboard.c

Here are some screenshots to follow that may help. lsusb -v output

image

Wireshark output image