cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
2,862 Views
Registered: ‎04-04-2018

ZYNQ UltraScale+ MPSoC and USB Video Class (UVC) Device Mode, Video frame drops on USB3.0

Hi, all.

 

I configured ZYNQ UltraScale+ MPSoC in UVC device mode with PetaLinux 2017.1.
When I connected our board to USB3.0 of Windows10 PC and captured the video, some video frames were dropped.
However, when I connect the board to USB2.0 of the PC, the video frame is not dropped.
I checked the isochronous packet of capture data of USB3.0, and the video frame was dropped on the USB.
Therefore, it seems that video frame send is dropping in ZYNQ UltraScale+ MPSoC.
Since the video data is 400x400 4fps, I think that the processing capacity of ZYNQ is sufficient enough.
This problem occurs when our board is connected to USB3.0.

 

Do I have anything to do with settings or config?
Are there any settings or configurations that I should check for values?

 

Any help is appreciated.

0 Kudos
7 Replies
jadhavs
Xilinx Employee
Xilinx Employee
2,850 Views
Registered: ‎01-21-2008

Hi iwazaki,

There is a known issue with the Petalinux 2017.1 till 2017.4 s/w version for USB UVC device mode. Please use the updated patch with 2017.1 or 2017.4 s/w version and try increasing the mult > 1.

Let me know if this works for you or not?


Thanks, Shashi

0 Kudos
2,818 Views
Registered: ‎04-04-2018

Hi, jadhavs-san.

 

Thank you for your quick reply.

 

> increasing the mult> 1.
Will it be udev->mult to set from the UVC control application?

 

I applied a your patch to my project created with PetaLinux 2017.1, the transmission of the video frame stopped in 16 frames. After that, when I set mult to 2 and run it again, no video frames were sent.

My project has also applied other UVC patches. So I applied your patch to PetaLinux 2017.1 which does not apply any patches at all. I run this project, but no video frames were sent.

 

Do I need to apply other patches as well?

 

Best Regards.

iwazaki

0 Kudos
jadhavs
Xilinx Employee
Xilinx Employee
2,809 Views
Registered: ‎01-21-2008

Hi, iwazaki-san,

 

Please apply both the patch I send it to you and other related patches as well.

I've tested it on 2017.4 s/w version and it should work on 2017.1 s/w version as well as there are no other updates for this version of s/w. Let me know if this works or not?

 

Thanks & Best Regards,

jadhavs

0 Kudos
2,773 Views
Registered: ‎04-04-2018

Hi, jadhavs-san.

 

Of course I applied both of your patches to 2017.1. But it does not work well. Could you tell me other related patches?

 

I created a 2017.4 project and applied your two patches. However, when connected to USB 3.0, no video frames are transmitted. When connecting to USB 2.0, video frames are transmitted.

My project is a composite device of UVC+CDC. The Windows10 PC is detecting both devices. My application is receiving characters that I typed in keyboard via CDC connected to USB 3.0.

 

Do you use 2017.4, only applied your 2 patches?

Are you applying other fixes or patches?

 

What kind of user space application do you use? Is uvc-gadget.c?
Is it possible to send me the user space application you are using?

 

Also, could you tell me which board you are using?
I am developing UVC devices using original board with ZYNQ UltraScale+ MPSoC.

 

Thanks & Best Regards.
iwazaki

0 Kudos
2,707 Views
Registered: ‎04-04-2018

Hi, jadhavs-san.

 

I will inform you of additional information.
I have created 2017.4 for the ZCU102-ES evaluation board. I ran uvc_gadget.c on the ZCU102 but the video frame was not sent. I will describe the procedure that I did below.

 

1) Project generation from "xilinx-zcu102-zu9-es2-rev1.0-v2017.4-final.bsp" file
    % petalinux-create -t ​​project -s xilinx-zcu102-zu9-es2-rev1.0-v2017.4-final.bsp

 

2) Change kernelconfig
    USB Gadget Support "USB Webcam Gadget" enabled

 

3) Change device tree
    system-user.dtsi


    / include / "system-conf.dtsi"
    / {
+    memory {
+       device_type = "memory";
+       reg = <0x0 0x0 0x0 0x20000000>;
+     };
     };

 

+    & dwc3_0 {
+       dr_mode = "peripheral";
+    };

 

4) Apply Xilinx patch
    0001 - usb - dwc 3 - fix - for - isocronous - transfer - performance - inc.patch
    0002-usb-fix-for-uvc-isoc-issue.patch

 

    linux-xlnx _%. bbappend


       SRC_URI + = "file: // bsp.cfg \
                               file: //user_2018-04-09-09-49-00.cfg \
                               "
+    SRC_URI_append = "\
+                file: //0001-usb-dwc3-fix-for-isocronous-transfer-performance-inc.patch \
+                file: //0002-usb-fix-for-uvc-isoc-issue.patch \
+                "

       FILESEXTRAPATHS_prepend: = "$ {THISDIR} / $ {PN}:"

 

5) Run uvc-gadget.c

 

Could you please tell me any other necessary steps?

 

Best Regards.
iwazaki

 

0 Kudos
jadhavs
Xilinx Employee
Xilinx Employee
2,415 Views
Registered: ‎01-21-2008

Hi iwazaki-San,

 

We have patch fix for 2017.1 to 2017.4 Petalinux s/w version. I'll send you a patch to PM. 

 

This issue is fixed in 2018.2 Petalinux USB drivers release.

 

Thanks

 

0 Kudos
gladson
Observer
Observer
328 Views
Registered: ‎01-31-2021

We are using zynq Ultrascale + MPSoC with custom board.
Our board has 2 USB ports(Host 2.0 and device 3.0), 2 SDI(one input and another output).
Kernel version on board is 4.19.0 and In host PC 5.4.0-58-generic.
Final project according to customers requirement is Streaming 1080p video taking input from SDI and taking output from USB UVC(device).
Currently We are trying with connecting C922 Pro Stream Webcam to USB(host) port.This creates /dev/video0 node.
Then modprobe g_webcam. This creates /dev/video1.
Using the application https://github.com/peterbay/uvc-gadget. At host side /dev/video0 is created and superspeed webcamera is detected.
When I try to stream from logitech usb camera connected to 2.0 host port to 3.0 UVC device port connected to ubuntu PC and  using application such as guvcview, at the device side, getting below attached log USBGITLG.txt.
I need some more input so that I canmove forward with this project.

Tags (2)
host.png