Can't receive data on EP0 in control transfer for HID class

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

Can't receive data on EP0 in control transfer for HID class

ソリューションへジャンプ
1,823件の閲覧回数
chuckh
Contributor III

Hello,

My application is supposed to receive a 64 byte packet on EP0 in the form of a SET REPORT.  There is code in usb_framework.c in  USB_Control_Service() for class requests with non-zero size that calls _usb_device_recv_data().  However, when this function is called, my data buffer is not updated.  I added code to call _usb_device_get_transfer_status() after _usb_device_recv_data() and find that this function returns USB_STATUS_TRANSFER_IN_PROGRESS indefinitely.

Am I missing a call to another function to service the USB or perhaps there is something else I am missing?

Any help will be greatly appreciated.

ラベル(3)
0 件の賞賛
返信
1 解決策
1,426件の閲覧回数
chuckh
Contributor III

I figured out that the LONG_RECEIVE_TRANSACTION and LONG_SEND_TRANSACTION defines were messing me up.  Once I changed the Max Packet to 64 and removed these defines, it seems to be working fine.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,426件の閲覧回数
chuckh
Contributor III

It seems like the _usb_device_recv_data() sets up for the next receive, which I expect to be EP0 OUT transaction (Host to my device).  The USB sniffer shows this packet is acked, so where does it go in the stack?  Since it is on EP0, shouldn't I see this in the USB_Control_Service() function?

0 件の賞賛
返信
1,427件の閲覧回数
chuckh
Contributor III

I figured out that the LONG_RECEIVE_TRANSACTION and LONG_SEND_TRANSACTION defines were messing me up.  Once I changed the Max Packet to 64 and removed these defines, it seems to be working fine.

0 件の賞賛
返信