LPC55x: Do you offer examples for custom class USB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC55x: Do you offer examples for custom class USB

1,969 Views
i_kamal
Contributor III

Hi,

For a future application, we need to have USB high speed interface with LPC55S69 or equivalent chip.

We could not find any example in the SDK. Can you provide any information that points us in the right direction?

  • Do you offer any example for using a custom, user defined class to work with Win USB
  • Do you provide examples for Mac / Linux?

Thank you.

Labels (1)
0 Kudos
7 Replies

1,799 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello ,

Hope you are doing well.

The SDK has several examples using the USB. There are plenty to get you started using as a device or host.

pastedImage_1.png

For the questions regarding the signed drivers:

https://community.nxp.com/thread/357509

The SDK can be downloaded for Linux/MACOS. This needs to be selected when building the SDK on our website.

pastedImage_3.png

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,799 Views
devel
Contributor III

I have the same question -- I want to add support for one of the standard USB classes that is not one of your examples.

Is there are document that describes the USB library?

0 Kudos

1,799 Views
i_kamal
Contributor III

Well, I was able to do what i want finally.

It was long, but doable.

In my case i started with the dev_usb_cdc_acm_lite_bm SDK example, and started to read, simplify, rewrite things, compare with USB specification, and slowly it all made sense.

In my case, i was able to reach 15MB/s on a user defined class using bulk transfert

0 Kudos

1,799 Views
devel
Contributor III

I downloaded the documentation and ... it's not helpful.

Why can't this be simple? For handling enumeration, all we need to do is make one big structure that holds the descriptors, and the enumeration code can read it and send it. Then during operation, all that we need is a way to write data (for host IN transactions) on a given endpoint, and read data (for host OUT transactions) on a given endpoint, with a callback to say when data were written or read.

0 Kudos

1,799 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Andy, 

I'd ask for you to please open a new thread concerning your question. So the information is easier to find for other customers that have a similar issue. In your new thread could you please specify the MCU you are using SDK and IDE version as well as how you are implementing your application so we can check it with detail.

Best Regards,

Sabina

0 Kudos

1,799 Views
i_kamal
Contributor III

Hello Sabina,

Thank you for your response.

Since my last post, I have made a lot of advance, but I have new - more precise - questions

I am trying to implement my custom user defined (vendor specific) class and i intent to send/receive data using libusb.

What I have done so far:

  • I started from the dev_cdc_acm_vcom example (bare metal)
  • I modified PID/VID to use my WinUSB driver, and changed class to 0xFF (vendor specific)
  • I have written a small C++ software on host side, that can list, detect and open my USB device
  • I am *trying* to send 512 bytes of data via USB bulk transaction, from host PC to device.

Where i'm stuck:

On the device side, each time a packet is recieved on the USB, I follow the code from the USB1_IRQHander() all the way to USB_DeviceLpcIp3511IsrFunction(), which then calls USB_DeviceLpc3511IpInterruptToken(), which then calls USB_DeviceLpc3511IpCancel()

I think this last "cancel" function call is the problem. For some reason, it seems like endpoint is deactivated for some reason, or maybe I'm getting something totally wrong. 

If you could point me in the right direction it would be very much appreciated.

Thank you very much,

0 Kudos

1,215 Views
alborgMB
Contributor II

 Hi @i_kamal 

On the device side, each time a packet is recieved on the USB, I follow the code from the USB1_IRQHander() all the way to USB_DeviceLpcIp3511IsrFunction(), which then calls USB_DeviceLpc3511IpInterruptToken(), which then calls USB_DeviceLpc3511IpCancel()

Based on your later comment on the thread, it seems that you were able to fix this issue. I'm working with the i.MX RT600, which uses the same IP3511 USB controller as the LPC 55x series and am encountering the same issue when trying to program the SoC as a vendor-specific USB device with multiple Bulk endpoints.

My device isn't successfully enumerated by the PC as USB_DeviceLpc3511IpInterruptToken() calls the IpCancel function.

What was the reason that you were able to find and how were you able to fix it?

 

Thank You,

Ali.

0 Kudos