I loaded g_serial gadget driver to enumerate in device mode using
modprobe g_serial use_acm=0 idVendor=0xABCD idProduct=0xABCD
I wrote a console app in windows which uses WinUSB library to receive the data in a tight loop from the device(sending in a tight loop)
When connected with 2.0 cable I can see throughput as 45 MBps which is close to theoretical values.
But when connected with 3.0 cable throughput just reaches 80 MBps.
I need help knowing what's the bottleneck (g_serial or Windows Host)?
Since I have two iMX8M boards, I thought of eliminating windows and make one board act as host to other.
Yocto-Image used: core-image-base with libusb1 appended
wrote a console app (Host side) which uses LibUSB-1.0 library to receive the data in a tight loop from the device(sending in a tight loop).
When connected with 2.0 cable I can see throughput as just 6 Mbps and see following error continuously popping on the terminal.
"xhci-hcd xhci-hcd.0.auto: WARN Event TRB for slot 3 ep 2 with no TDs queued?0 > 0"
And when the error messages stop, I see throughput hit 45 MBps.
This repeats : Error messages for some time and stops and then start again.
Find the attachments for host-side and device-side code and block diagram of the setup.