5 Replies Latest reply on Jun 18, 2020 12:57 PM by drozwood90

    UltraZed USB 3 IDS Camera Speed Issue

    jbspears

      We have the UltraZed eval board (EG) and have Xilinx 2017.4 u-boot/kernel with Ubuntu 18.04 running.  USB 3 seems to be setup correctly - all USB 3 devices we've tried are recognized as USB 3.  We are connecting an IDS Ueye camera to the USB port and trying to reach a frame rate that would be approximately 1.1 Gbps throughput.  However, we are only able to get around 780 Mbps before errors start to occur in the stream transfer over USB.  We have ran the USB 3 performance test provided by Avnet with various pen/usb drives and depending on the drive and the test (fixed block/block size, etc.) sometimes to get close to 1 Gbps.  The camera works fine at the high frame rate (and even higher) on an Ubuntu desktop computer with USB 3.

       

      Anyone else tried running a USB 3 camera at a high frame rate on these boards?  Or have any idea of maybe a configuration somewhere (hardware/software) that might improve the USB 3 throughput?

       

      Thanks!

        • Re: UltraZed USB 3 IDS Camera Speed Issue
          drozwood90

          Hi John,

           

          First, have you seen this blog article I posted?

          Solve USB 3.0 issues with this one weird trick

          Second, do you have a local XFAE you are working with?  If so, you should contact them about this issue.  Please also have them reach out to me as I can help provide some guidance to them.

           

          In the mean time, it is strange that you ask this at this time!  I just responded to another user where I explained that I had used a USB 3.0 camera with an Ultra96V2 (I realize not the same, but it is the same basic circuit).  I recall using that at high resolution, but I admit that I cannot say what the bit rate was.  Only that it was a CU30 (3.4MP) and was likely running at 1080P60.  I realize not apples to apples, but it just seemed strange two posts related to USB and video!

          https://www.e-consystems.com/ar0330-lowlight-usb-cameraboard.asp

           

          --Dan

          2 of 2 people found this helpful
            • Re: UltraZed USB 3 IDS Camera Speed Issue
              jbspears

              Thanks for the info Dan.  Actually that blog article got me as far as I have gotten so far - getting a USB cable that works with the UltraZed (got the cable/adapter from Amazon).  With the right cable the camera was recognized as a USB 3.0 device.  Since I posted this earlier today, I ran the UltraZed performance test with a USB 3 toaster and a SSD on both a Linux desktop and the UltraZed.  Both performed about the same - around 300MB/s for read and write (I need only around 130MB/s).  So that tells me the USB 3 is performing at good speeds (at least for a SSD drive anyway) and the issue may be more camera/driver related.

               

              Camera I'm using:

              https://en.ids-imaging.com/store/ui-3140cp-rev-2.html

               

              I will look through the article again for any other ideas just in case.  Thanks!

                • Re: UltraZed USB 3 IDS Camera Speed Issue
                  drozwood90

                  John,

                   

                  Now you got me thinking...watch your processor loading.  I've seen where dropping everything on 1 core can make funny things happen as well.  IIRC, that is why our Webcam interface on the UltraZed-EV VCU TRD Port uses 2 or 3 threads to spread the load across the various processors.  I can't be certain how many threads, but I do recall we split the gstreamer path up to a few cores.

                   

                  --Dan

                  1 of 1 people found this helpful
                    • Re: UltraZed USB 3 IDS Camera Speed Issue
                      jbspears

                      Finally made some progress.  After changing the frame size to a power of 2 (512x512) and using a powered USB hub, we are able to meet framerate (500 fps).  However, we are seeing random failures with the USB.  It can happen after running for 15 minutes or it can happen after running for 2 minutes.  The error messages are:

                       

                      [   83.289070] xhci-hcd xhci-hcd.0.auto: Stopped the command ring failed, maybe the host is dead

                      [   83.313647] xhci-hcd xhci-hcd.0.auto: Abort command ring failed

                      [   83.319478] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up

                      [   83.319527] xhci-hcd xhci-hcd.0.auto: Error while assigning device slot ID

                      [   83.319531] xhci-hcd xhci-hcd.0.auto: Max number of devices this xHCI host supports is 64.

                      [   83.319536] usb usb1-port1: couldn't allocate usb_device

                      [   83.345402] usb 2-1: USB disconnect, device number 3

                      1 of 1 people found this helpful