LPC55Sx - USB High-Speed High-Bandwidth Isochronous Operation

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

LPC55Sx - USB High-Speed High-Bandwidth Isochronous Operation

1,628 Views
npaiva-cmu
Contributor I

Hi,

I am trying to develop a USB Video application (UVC) using the LPC55S26 microcontroller. I have gotten USB-HS to work reliably with one transaction per microframe, but have not been able to successfully get it working with multiple transactions per microframe.

I have tried changing the "wMaxPacketSize" in the endpoint descriptor to request more transactions. The endpoint descriptor successfully shows up in Microsoft USBView as supporting "2 transactions per microframe". Unfortunately, this does not cause the computer to poll more than once a microframe.Screenshot 2021-08-18 154816.png

I suspect that something else needs to be changed related to the Packet IDs. For only a single transaction per frame the USB driver only has to send DATA0 packets. In order to successfully do more than one transaction per microframe the driver needs to send DATA1 and/or DATA2 packets (see the image below from the USB-Video specification). Unfortunately I have not yet found a way to change the packet ID in the source code.

npaivacmu_0-1629316437506.png

Is there any way to enable sending more than one transaction a microframe for the USB-HS interface in device mode on the LPC55S2x?

The errata for this device states that this is not possible in host mode. Is the same true for device mode?

npaivacmu_1-1629316617466.png

Thanks,

Nick

0 Kudos
Reply
2 Replies

1,603 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @npaiva-cmu 

I hope you are doing great, 

 Apparently the Errata  it is not affecting the USB HS in device mode to send 3 transfers per  micro-frame , but I am currently consulting about the LPC55s2x stack and hardware support with our AE team.  I will let you know as soon I gather sufficient feedback for you.

I just have some simple additional questions , could you help me with them? 

  • Are you taking our dev_video_virtual_camera SDK example  as a reference?
  • What is the total size of packets per  micro-frame do you want to achieve and tested ? (I suppose that it is  1024 bytes per transfer)

My apologies for the delay,

All the best, 

Diego.

0 Kudos
Reply

1,585 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @npaiva-cmu 

I hope you are doing well.

We have been checking with the SW team ; they  did some experiments and have the follow founds and SW patch :

Case 1: The ISO IN MPS is 512 (less than 1024) and 2 additional transactions (total 3 transactions) per micro-frame.

              Win10 will not poll more than once in one micro-frame as your  description. I think it is the  customers case.

Case 2: The ISO IN MPS is 1024 and 2 additional transactions per micro-frame.

              Win10 will poll more than once in one micro-frame, and the ip3511 (HS USB) controller seems to  work well.

Case 3: the ISO IN MPS is 1024 and 0 additional transactions per micro-frame.

              This is one IP issue and confirmed by design. Tested on  LPC55S28, where the IP3511HS controller has not interrupt when                            transferring 1024 bytes of data.

So only the Case 2 can work. Because the case 3s IP issue, we didnt do much additional transactions test in SDK USB stack, there need one patch to implement it and it is attached. The patch, attached in this reply  is based on the 2.10.0 SDK.

Please notice that: we dont do much test for the IP3511HS controller additional transactions function. Since the case 3 IP bug, we cannot guarantee that the additional transactions can always work well for some corner cases, our customers can try it and do more tests.

You need call USB_DeviceVideoSend() API function  with at least the data that need be transferred in one micro-frame. For example:

  1. There are N (N <= 1024*3) data that need be transferred in one micro-frame, the all N data need be passed to USB_DeviceVideoSend, then controller will transfer all the data to Host in one micro-frame.
  2. There are N (N > 1024 * 3) data that need be transferred.
    1. The all N data can be passed to USB_DeviceVideoSend, then controller will transfer all N data in multiple micro-frames.
    2. The 1024*3 data can be passed to USB_DeviceVideoSend firstly, it will be transferred in one micro-frame. Then pass the remaining data to USB_DeviceVideoSend again.

I hope this could help, 

Diego.

 

0 Kudos
Reply