Custom USB device class - Endpoint callbacks not being called

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Custom USB device class - Endpoint callbacks not being called

1,426 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NickAtKandevsys on Mon Jan 27 10:16:33 MST 2014
I have a project based on the LPC1830, we are using the USB functionality in the boot rom to create a custom device class. The version field from the USBD_API_T is 0x01111101.

I register a class handler (core->RegisterClassHandler()) and an endpoint handler for EP2-IN (core->RegisterEpHandler())

The device enumerates and I am handling all of the standard and custom setup packets ok. However:

1. I do see some callbacks on this handler during enumeration (that is unexpected)
2. When the host app starts polling the device for data on Endpoint2-In (isoch) I see no call backs to the end point handler so I deliver no data to the endpoint.

Are there any known issues in this area? Custom device classes seem to be poorly documented. If there is a bug I presume I have the option to compile the source to the USB stack into my application and drive the USB hardware directly from my device app?

Thanks for any insight,
Nick

标签 (1)
0 项奖励
回复
2 回复数

1,219 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NickAtKandevsys on Wed Jan 29 04:55:04 MST 2014
Thanks for the suggestion. I have applied those fixes.

I think the issue was caused by a misunderstanding on my part as to how the callback mechanism works. It seems like the callback is only called when the pipe goes empty, not on every endpoint poll.

So for the first data transfer you have to manually put data in the pipe, once that data is sent the callback will be invoked so more data can be put into the pipe for transmission.


0 项奖励
回复

1,219 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by durgesh on Tue Jan 28 19:01:49 MST 2014
Current ROM version doesn't support isochronous endpoints properly. Check the errata http://www.nxp.com/documents/errata_sheet/ES_LPC18X0.pdf for workaround.
0 项奖励
回复