7 Replies Latest reply on Nov 15, 2018 9:12 PM by srnt

    FX3 UVC in Trigger mode

    GunasekaranSrinivasan

      When I put the image sensor in trigger mode, it's working fine as long as trigger speed is constant. The moment I change external trigger rate, I am getting error in image capture in the PC side.

       

      I have few questions,

      1. Is it something to do with the frame interval or bitrate in the descriptor?

      2. Do we have to use other modes like Isochronous for trigger based capture?

        • 1. Re: FX3 UVC in Trigger mode
          srnt

          Hello,

           

          - Please let know if you are referring to the trigger based still image capture or explain if it is different.

          - Are you referring to the Cypress' AN75779 example application?

          - Also, mention the UVC spec which your application is compliant to.

           

          Best regards,

          Srinath S

          • 2. Re: FX3 UVC in Trigger mode
            GunasekaranSrinivasan

            Srinath,

             

            - I am not sure about Trigger based Still Image capture mode. I want to put the image sensor in trigger mode & in PC side I will wait for new frame continuously, Whenever a frame is available, I will read it.

            - Yes I am.

            - I am using the same spec as AN75779.

             

            Thanks,

            Guna

            • 3. Re: FX3 UVC in Trigger mode
              srnt

              Hello Guna,

               

              - I understand that the image data is ready to be transmitted to the host only after the image sensor is triggered. Please correct me if I am wrong. If this is the case, kindly, let me know how many frame data are transferred for each trigger on the image sensor.

              - When you modify the trigger rate, have you taken care of the fps in the glProbeCtrl structure in the FX3 firmware?

              - Please mention the host application that you are using.

              - Also, mention the changes that you have made to the AN75779 code.

               

              Best regards,

              Srinath S

              1 of 1 people found this helpful
              • 4. Re: FX3 UVC in Trigger mode
                GunasekaranSrinivasan

                Srinath,

                 

                1. Yes. thats correct. But we cannot fix the trigger rate, as it will change.

                2. Yeah. I am aware of that. But in my case I cannot fix the fps

                3. I am using libuvc in Linux https://github.com/ktossell/libuvc

                4. I made some changes in the descriptor & probectrl to change the interval

                 

                Thanks,

                Guna

                • 5. Re: FX3 UVC in Trigger mode
                  srnt

                  Hello Guna,

                   

                  - Can you please post the glProbeCtrl[] structure and the Class Specific VS Frame Descriptor details?

                  - Kindly, let me know what is the error that you see on the PC. Ideally, though the image sensor is sending data at different rates, the PC is unaware of this fact and should be sampling data from the FX3 as long as it is committed from the GPIF II to the USB. Care has to be taken such that there is enough bandwidth on the bus for the modified frame rate.

                  - In case you have got access to a USB protocol analyzer, capture the traces during the failure and share the same.

                   

                  Best regards,

                  Srinath S

                  • 6. Re: FX3 UVC in Trigger mode
                    GunasekaranSrinivasan

                    - glProbCtrl:

                    uint8_t glProbeCtrl[CY_FX_UVC_MAX_PROBE_SETTING] = {

                        0x00, 0x00,                 /* bmHint : no hit */

                        0x01,                       /* Use 1st Video format index */

                        0x01,                       /* Use 1st Video frame index */

                        0x15, 0x16, 0x05, 0x00,     /* Desired frame interval in the unit of 100ns: 30 fps */

                        0x00, 0x00,                 /* Key frame rate in key frame/video frame units: only applicable

                                                       to video streaming with adjustable compression parameters */

                        0x00, 0x00,                 /* PFrame rate in PFrame / key frame units: only applicable to

                                                       video streaming with adjustable compression parameters */

                        0x00, 0x00,                 /* Compression quality control: only applicable to video streaming

                                                       with adjustable compression parameters */

                        0x00, 0x00,                 /* Window size for average bit rate: only applicable to video

                                                       streaming with adjustable compression parameters */

                        0x00, 0x00,                 /* Internal video streaming i/f latency in ms */

                        0x00, 0x90, 0x7E, 0x00,     /* Max video frame size in bytes */

                        0x00, 0x40, 0x00, 0x00,      /* No. of bytes device can rx in single payload = 16 KB */

                    }

                    Frame descriptor:

                    0x1E,                           /* Descriptor size */

                    0x24,                           /* Descriptor type*/

                    0x05,                           /* Subtype: uncompressed frame I/F */

                    0x01,                           /* Frame Descriptor Index */

                    0x01,                           /* Still image capture method 1 supported */

                    0x00, 0x05,                     /* Width in pixel */

                    0xD0, 0x02,                     /* Height in pixel */

                    0x00,0x50,0x97,0x31,            /* Min bit rate bits/s. */

                    0x00,0x50,0x97,0x31,            /* Max bit rate bits/s. */

                    0x00,0xA4,0x1F,0x00,            /* Maximum video or still frame size in bytes(Deprecated)*/

                    0x15, 0x16, 0x05, 0x00,         /* 30fps */

                    0x01,

                    0x15,0x16,0x05,0x00,

                     

                    - In I am getting timeout error.

                    - I will try to set up and get it.

                     

                    Thanks,

                    Gunasekaran

                    • 7. Re: FX3 UVC in Trigger mode
                      srnt

                      Hello Gunasekaran,

                       

                      Please share the USB trace files containing the issue observed. In case you do not have access to hardware protocol analyzers, you can use software analyzers like USBLyzer.

                       

                      EDIT:

                      - When the frame rate is continuously varying, the glProbeCtrl[] structure needs to be updated to let the host driver know about the expected frame size. When the expected frame size does not match the actual frame size from the image sensor, the UVC driver drops the frame.

                       

                      Best regards,

                      Srinath S