cancel
Showing results for 
Search instead for 
Did you mean: 

USBD_CUSTOM_HID_SendReport function makes devise busy but no one can make device unbusy.

dungeonlords789
Senior III

I create Custom hid and send 2 PC report using

while(1){

USBD_CUSTOM_HID_SendReport(&hUsbDeviceFS, dataToSend, 4);

}

And... Device is frozen. Why? I am going inside HAL->USBD_CUSTOM_HID_SendReport... I see code

hhid->state = CUSTOM_HID_BUSY;

so USBD_CUSTOM_HID_SendReport function makes devise busy but no one can make device unbusy. Is it ok?

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

The endpoint is marked "unbusy" when the host sends IN request and the controller spews the queued data on the wire. If this does not occur -either the host does not read, or something is wrong with setup of USB controller & device.

-- pa

View solution in original post

2 REPLIES 2
cchao
Associate II

Please check your device descriptor and endpoint descriptor to check whether it works correct or not.

Normally it depends on the size or endpoint buffer setting wrong.

Pavel A.
Evangelist III

The endpoint is marked "unbusy" when the host sends IN request and the controller spews the queued data on the wire. If this does not occur -either the host does not read, or something is wrong with setup of USB controller & device.

-- pa