-
Notifications
You must be signed in to change notification settings - Fork 361
USB composite CustomHID endpoint size configuration problem #300
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemmwMiddleware-related issue or pull-request.Middleware-related issue or pull-request.st usbSTMicroelectronics' Universal Serial Bus (Host or Device) librarySTMicroelectronics' Universal Serial Bus (Host or Device) libraryusbUniversal Serial BusUniversal Serial Bus
Milestone
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinginternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemmwMiddleware-related issue or pull-request.Middleware-related issue or pull-request.st usbSTMicroelectronics' Universal Serial Bus (Host or Device) librarySTMicroelectronics' Universal Serial Bus (Host or Device) libraryusbUniversal Serial BusUniversal Serial Bus
Type
Projects
Status
Done
Brief description
USB composite CustomHID wrongly refers endpoint size definitons and mismatch IN and OUT endpoints configuration.
Describe the set-up
The board: (not relevant) custom board with STM32H7B0IBT6 MCU
IDE: (not relevant) STM32CubeIDE 1.16.1, GNU Tools for STM32 11.3rel1.
Describe the bug
USBD_CMPSIT_CUSTOMHIDDesc() in usbd_composite_builder.c uses wrong definition for Out Endpoint size configuration. It uses "CUSTOM_HID_EPIN_SIZE" instead of "CUSTOM_HID_EPOUT_SIZE", which will causes issues if sizes are different.
Similarly, SBD_CMPSIT_AddToConfDesc() function, in CLASS_TYPE_CHID case, refers to CUSTOM_HID_EPOUT_SIZE for both endpoint setting (with USBD_CMPSIT_AssignEp).
How To Reproduce
Configure a composite USB Device that includes a CustomHID interface.
Set different sizes for IN and OUT endpoints.