USBHID driver packet send fails when multiple message sent on one endpoint

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USBHID driver packet send fails when multiple message sent on one endpoint

1,431件の閲覧回数
Vishal_Panchal
Contributor I

While sending more than one packet on same endpoint using USB_DeviceHidSend(), sometimes packet is not sent out on USB.

While, as per description of USB_DeviceHidSend(), 
 " Currently, only one transfer request can be supported for one specific endpoint. If there is a specific requirement to support multiple transfer requests for one specific endpoint, the application should implement a queue in the application level. The subsequent transfer could begin only when the previous transfer is done (get notification through the endpoint callback). "

So, I have implement a queue based on ringbuffer to store the packets. And I am sending those stored packets whenever I receive the response kUSB_DeviceHidEventSendResponse via USB_DeviceHidInterruptIn.

Is it correct implementation to avoid usbhid packet send failure?

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

1,344件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Vishal_Panchal,

Yes, it is correct to implement a queue to handled these individual transfer requests as to make sure that the subsequent transfer begings only after the previous one is done.

There may be several ways to implement this. A relayed topic was covered, for example, on the following thread.

https://community.nxp.com/t5/MCUXpresso-SDK/K22-USB-device-CDC-and-HID-problem/m-p/817565

I hope that this helps!

Regards,
Gustavo

0 件の賞賛
返信