USB interface not part of a class driver

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

USB interface not part of a class driver

1,232件の閲覧回数
mditto1
Contributor III

Hi, I am working on a USB device implementation using LPC55S69.  I have the high speed USB interface working with device class drivers based on the SDK examples but now I am trying to add an additional vendor-defined interface with bulk in and bulk out endpoints.  I have not gotten this to work yet and I don't see any examples of using endpoints directly (not via one of the standard class drivers).

I added the appropriate descriptors for the interface and endpoints, and (starting with just the IN direction for now) I have called USB_DeviceInitEndpoint and USB_DeviceSendRequest, and my callback gets called (immediately, even if there is no read initiated from the host).

When I do make a read request from the Linux host to the IN endpoint, I get I/O Error.

Is there something else I need to do?

Thanks,
Mike

0 件の賞賛
返信
4 返答(返信)

1,212件の閲覧回数
carstengroen
Senior Contributor II

I know its not the same CPU, but I have a feeling that the USB stuff from NXP is somewhat the same across some of their processors.

I was thru the same challenge on the i.MXRT processors, maybe there is something that can help you there: https://community.nxp.com/t5/i-MX-RT/Working-Custom-USB-example-using-Bulk-transfer-incl-code/m-p/12...

0 件の賞賛
返信

1,189件の閲覧回数
mditto1
Contributor III

Thanks, Carsten,

It looks like you basically created a new class driver, "MyBulk".  I assume you modified the s_UsbDeviceClassInterfaceMap table in the USB stack to reference your functions like USB_DeviceMyBulkInit and USB_DeviceMyBulkEvent.  I was hoping there would be no need for a class driver since this interface has no class functionality and only the device-specific custom data on its two endpoints and that I could use the endpoint operations directly without any class driver.  Did you find that the class driver is necessary?

I will look further at your example code for ideas, thank you.

0 件の賞賛
返信

1,183件の閲覧回数
carstengroen
Senior Contributor II

You will be pleasantly surprised

The code is basically very simple, I think when you go thru the files you will see it is not that complicated (although it took me some time to figure it all out)

Let me know if there is anything specific, Its been a while since I did the code, so I will have to dig it up from the back of my head, it has just been running flawlessly since I did the code

Regards,

Carsten

0 件の賞賛
返信

1,216件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

We can confirm we don’t have USB vendor specific class and don't have related demo for sharing.

If say USB msc bulk transfer, I recommend to import the SDK example dev_msc_sdcard_freertos. In the file usb_device_config.h please change the value for the highspeed macro and for the full speed macro change it to zero. Then proceed in sending the bulk messages you are expecting to send.

Have a nice day,

Jun Zhang

0 件の賞賛
返信