Poor I.MX8 USB 2.0 Host Performance

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

Poor I.MX8 USB 2.0 Host Performance

694 Views
cgiordano
Contributor III

Hi, I am using the MCIMX8QXP-CPU Development Board and working on developing support for a particular USB device with this I.MX8.  I am building the Yocto project - specifically have tried everything from the core-image-minimal to the imx-image-core (per the I.MX Yocto User's Guide for the v.5.4 kernel).  So this is how it goes...

First, I developed a set of modules on my nearly 10 year old PC that I installed a version of Linux Mint on (v.19.3 Cinnamon) to work on getting a Linux kernel able to properly interface with my USB device.  This USB device in general is an imaging device for purposes I am not at liberty to disclose, but rest assured, the interfaces necessary for it to function have been properly interface with the Linux USB core - i.e. the modules work when inserted into the kernel via 'insmod'.  That being said, the performance on this "ancient" Linux PC work great.  We get images from it by requesting via a BULK OUT frame, then the host does a few BULK IN frames to receive the frame as many times it needs to to acquire the complete image.  We have tried this on a couple older PCs that are both running Linux and we have seen times for the complete request-response to take ~40ms.  We have even verified this using our Teledyne Lecroy USB capture device (Mercury T2C) as well as Wireshark (on both Windows and Linux via USBpcap and usbmon respectively). 

So I then migrated these modules and test SW to the Yocto project that builds into these core-image-minimal all the way up to the imx-image-core builds, and the results are far from favorable.  We are seeing this request-response take ~65ms...  We have installed the kernel on a Class 10 SD card and even installed the kernel on the onboard eMMC...  Same timing results, so the ROM has no impact on this test.  When I use the Teledyne USB captures, I notice that the transfers are slightly smaller and more timely, so that makes me think that the I.MX8 USB stuff is the culprit here.  I simply have no idea how to ratchet up the USB performance on this thing. 

Now, my PC that can get complete images at ~40ms has an old Intel Duo Core (1GHz each), 8GB of DDR3 RAM, and USB 2.0 host.  The I.MX8 has 4 cores that have been verified to have a max frequency of 1.2GHz per core, I believe 2.5GB DDR4 RAM (not too sure on size, but it's faster than DDR3), and the host supports USB 3.0 transfers... but the image data is transferred from this device in ~65ms.  What can be manipulated to make the USB perform faster or something of the sort I wonder?  Mind you, the test SW we are running in user-space functions just fine.  I can see the modules register via 'lsmod', the "dmesg | tail" messages indicate that the device is registering just fine, and indeed, I am getting images!  It just takes too long and there's no reason that I can think of WHY this is not working on the I.MX8 at least as well as the Linux PC I am using.  I have opened up a ticket with NXP support, and their answers are not helpful whatsoever...  I am at my wits end on this topic. 

So in a nutshell, my program works, modules work, but are SLOW.  How can I throttle the USB performance on this I.MX8?  What else might I provide to explain this situation more clearly if necessary?  Thanks in advance! 

0 Kudos
1 Reply

631 Views
Yuri
NXP Employee
NXP Employee

cgiordano@trijicon.com 

Hello,

   As this question had reached us already through your private ticket, NXP support is not responding

here, but keeps the question open in case others want to comment.

Regards,

Yuri.

0 Kudos