2018-05-10 05:30 AM
I'm developing an HID USB Host application. I have already opened a discussion (
https://community.st.com/0D50X00009XkX0ASAV
) about HID USB Host and I applied all the suggested patches in forum, but now I have another problem.When I try to send data to device (is a HID custom device that work fine if connected to PC) with SBH_HID_SetReport() function, it return 'USBH_BUSY' every time I try to send message.
The problem seems to be inside the USBH_HandleControl() function: the state machine reaches the 'CTRL_DATA_OUT_WAIT' state but, when it call USBH_LL_GetURBState(), return 'USBH_URB_STALL' status and than the USBH_HID_SetReport() function return 'USBH_BUSY'.This is the code used to send data:
&sharpdefine MAX_USBDATASIZE (64)
.
.
.
static uint8_t USBBufToSend[MAX_USBDATASIZE];
static uint16_t lenUSBBufToSend;
.
.
.
USBH_StatusTypeDef res;.
.
.
res=USBH_HID_SetReport(&hUsbHostFS,0x02,0x00,USBBufToSend,lenUSBBufToSend);
Why the device state is 'USBH_URB_STALL'? Is it my mistake?
Is possible to resume the correct state?null2018-08-10 09:34 AM
Sorry, bumping old zombie unanswered threads off my feed
2024-08-14 12:04 PM
Great support lol!! Can't help, bump it off! What a totally unprofessional mess ST USB driver is!
IMHO ST MCU business won't last much longer given all the competition such as Raspberry Pi and ESP industrial boards