2 Replies Latest reply on Sep 12, 2017 5:09 AM by MaAr_2545856

    AN75779 : FX3 Hangs after receiving two buffers of data from sensor



      We are trying to set up a UVC based camera using FX3 super speed explorer kit, FX3 FW example given with AN75779. Our actual sensor is not UVC compliant and therefore we use FPGA as a medium to take data from sensor and give it in UVC format to FX3. However, before interfacing actual sensor, we started working with a test pattern generated from FPGA to test and see out if we can see any display on the host application(VLC Media Player). In doing so we see that FX3 hangs after receiving two buffers of data from sensor(FPGA).


      Details of the test/experimental setup and the results given below


      Setup 1: Same Resolution 1280x720@30fps, YUV2, No I2C interface


      1) We have modified the sensor.c file to


      a) i2C bus test to return success unconditionally


      b) all i2c read/write calls in sensor init function commented out


      2) we have modified the uvc.c file to add more debug print statements to catch the flow of execution


      3) We have uncommented the DEBUG FRAME COUNT in uvc.h to print frame and buffer counts


      4) FPGA drives FV, LV and PCLK (104MHz for 8bit interface, 2 bytes per pixel)


      5) Generated the img file and programmed FX3.


      6) The FX3 gets enumerated as a UVC device and debug prints start printing the message "UVC : completed 0 frames and 0 buffers"


      7) VLC is set to use FX3 as capture device and start streaming by using Play


      8) Debug prints show streaming request received, gpif sm initiated and status of dma buffer for first two 16kB packets. After that we dont see any further activity from FX3. (This is confirmed as we have added print statements for both pass and fail conditions)


      9) When we reset FX3 kit, the FX3 resumes again. Sequence repeats. Plese find attached images cypress1 through cypress4 (snapshot of debug prints, cypress 4 after starting stream from VLC)


      Please note that the FV and LV are verified to be active when the strean is initiated from VLC and LV is active for 1280 * 2 PCLKs.


      10) We did the same experiment, this time setting the resolution from FPGA to 640x480 @ 30fps, YUV2. We however dint modify the FW according to resolution. We just wanted to check if we could see any change in FX3 behaviour. We get to see same response in this case to. Attached image cypress5 shows the result after starting the streaming in VLC for this case.




      Please let me know if i have missed any important change which could impact FX3 to this extent


      Also, please provide step by step details of modifying AN75779 FW to use it with sensors of different resolution and frame rate.




      Looking for  a quicker support. You may call or mail me at the contact details given below






      Ajay Kumar.




      +91 9482427152

        • 1. Re: AN75779 : FX3 Hangs after receiving two buffers of data from sensor

          Hi ,


          To test further, i have made some changes in FW to the following set up


          1) Modified GPIF to 16 bit interface, modified the 8bit gpif project to 16bit , modified LD ADDR CNT and LD DATA CNT max values to 8183


          2) Rebuilt the project and copied the latest config.h file to FX3 project.


          3) modified the SS config descriptor(format : aspect ratio, frame : width, height, frame size, frame interval, short frame interval) to support for 640x480@60fps


          4) modified usb 3.0 probe ctrl structure for frame interval and max frame size fields.


          5) Rebuilt FX3, programmed the latest image. I still get the same issue of hang after two buffers. (cypress5 image in earlier attachment)


          did i miss out anything? the pclk frequency used is 26MHz. Are there any dependencies or changes that are to be done with respect to clock frequency?

          • 2. Re: AN75779 : FX3 Hangs after receiving two buffers of data from sensor

            This issue has been solved by modifying the descriptors file

            /* Class specific Uncompressed VS format descriptor */

            0x08,                           /* X dimension of the picture aspect ratio; Non-interlaced */

            0x06,                           /* Y dimension of the pictuer aspect ratio: Non-interlaced */


            /* Class specific Uncompressed VS frame descriptor */

                    0xC2, 0x03,                     /* Width in pixel */

                    0x7F, 0x01,                     /* Height in pixel */

                    0x80, 0x28, 0x15, 0x15,            /* Min bit rate bits/s. */

                    0x80, 0x28, 0x15, 0x15,            /* Max bit rate bits/s. */

                    0x7C, 0x3E, 0x0B, 0x00,            /* Maximum video or still frame size in bytes(Deprecated)*/

                    0x0A, 0x8B, 0x02, 0x00,         /* 60fps */



            Then modified uvc.c


            /* UVC Probe Control Settings for a USB 3.0 connection. */


            0x0A, 0x8B, 0x02, 0x00,     /* Desired frame interval in the unit of 100ns: 60 fps */