2019-12-31 02:02 AM
I have tried create a USB Composite Device(CDC+MSC+HID) using STM32_USB_Device_Library V1.2.1, CDC and MSC works but HID not workable. When I use USBD_HID_SendReport() to send data to PC, MCU stuck.
I have change the sequence of CDC/MSC/HID Interface/endpoint order, it seems that the last one not workable.
MCU: STM32F429
#define CDC_INTERFACE 0x00
#define CDC_INTERFACE2 0x01
#define MSC_INTERFACE 0x02
#define HID_INTERFACE 0x03
#define CDC_IN_EP 0x81 /* EP1 for data IN */
#define CDC_OUT_EP 0x01 /* EP1 for data OUT */
#define CDC_CMD_EP 0x84 /* EP2 for CDC commands */
#define MSC_IN_EP 0x82
#define MSC_OUT_EP 0x02
#define HID_IN_EP 0x83
CDC/MSC/HID devices were seen in Windows Device Manager.
Please help. Thanks.
Solved! Go to Solution.
2020-01-01 07:10 PM
Fixed by change following line from "0" to "64" in usb_conf.h.
#define TX3_FIFO_HS_SIZE 64
Thanks.
2020-01-01 07:10 PM
Fixed by change following line from "0" to "64" in usb_conf.h.
#define TX3_FIFO_HS_SIZE 64
Thanks.
2024-04-19 10:06 PM
Thank you so much, I had the exact same problem, FIFO was not configured. In my case I had to call
HAL_PCDEx_SetTxFiFo(&hpcd_USB_OTG_FS, 2, 0x40);
Best of luck!