Skip to main content
dungeonlords789
Associate III
May 5, 2019
Solved

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

  • May 5, 2019
  • 2 replies
  • 1734 views

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?

This topic has been closed for replies.
Best answer by Pavel A.

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

2 replies

cchao
Associate
May 5, 2019

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.
Pavel A.Best answer
May 5, 2019

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