5 Replies Latest reply on Aug 15, 2018 10:21 PM by yyca

    How to enable the Camera Terminal specific UVC control selector codes defined in the UVC specification?

    maheswariamudha_2545856

      I want to enable all the camera control listed in the attached image.what all changes I have to do in the fx3 firmware.video-parameters.PNG

        • 1. Re: How to enable the Camera Terminal specific UVC control selector codes defined in the UVC specification?
          yyca

          In this response, I will take the procedures to enable brightness control as an example.

          • Enable the bmControl bit in the corresponding descriptor.

          BaiduShurufa_2018-8-15_15-50-39.bmp

           

          • Add the handle function in USBSetupCB(in the switch case statement related to control interface)
          • Create a user thread(EP0 thread in this example) to handle the event related to control interface.
                      if (eventFlag & CX3_UVC_VIDEO_CONTROL_REQUEST_EVENT)
                      {
                          switch ((wIndex >> 8))
                          {
                              case CX3_UVC_PROCESSING_UNIT_ID:
                                  UVCHandleProcessingUnitRqts ();
                                  break;
          
          
          //                    case CY_FX_UVC_CAMERA_TERMINAL_ID:
          //                        UVCHandleCameraTerminalRqts ();
          //                        break;
          //
          //                    case CY_FX_UVC_INTERFACE_CTRL:
          //                        UVCHandleInterfaceCtrlRqts ();
          //                        break;
          //
          //                    case CY_FX_UVC_EXTENSION_UNIT_ID:
          //                        UVCHandleExtensionUnitRqts ();
          //                        break;
          
          
                              default:
                                  /* Unsupported request. Fail by stalling the control endpoint. */
                                  CyU3PUsbStall (0, CyTrue, CyFalse);
                                  break;
                          }
                      }
          

           

          • Create the function UVCHandleProcessingUnitRqts to handle all the supported requests.

           

          You could check the attachment for detailed information.  I am afriad that I miss something above.

          • 3. Re: How to enable the Camera Terminal specific UVC control selector codes defined in the UVC specification?
            maheswariamudha_2545856

            I want to enable camera terminal request. I tried changing the value in the descriptor. But in the AMcap the camera control tab was disabled.

             

              0xFF,0x03,0x00,                 /* bmControls field of camera terminal: No controls supported */

             

            What changes I have to make for enabling the options as shown in figure.

             

             

            0x03,                           /* Size of controls field for this terminal : 3 bytes */

                                                    /* A bit set to 1 indicates that the mentioned Control is

                                                     * supported for the video stream in the bmControls field

                                                     * D0: Scanning Mode

                                                     * D1: Auto-Exposure Mode

              

                                                     */

            #ifdef UVC_PTZ_SUPPORT

                    0x00,0x0A,0x00,                 /* bmControls field of camera terminal: PTZ supported */

            #else

                    0x00,0x00,0x00,                 /* bmControls field of camera terminal: No controls supported */

            • 5. Re: How to enable the Camera Terminal specific UVC control selector codes defined in the UVC specification?
              yyca

              You need to debug your firmware to find the error.  Using some software tools, like BUS HOUND, may help you a lot.

              In addition, UART printting is also helpful.

              In general, you need to confirm the get/set command are well handled in your firmare.

              Of course, you need to define the necessary macros for this feature. I have done that in my example above.

               

              Just as I have said, the implement steps of this feature are the same for CX3 and FX3. It doesn't depend on that since they are both UVC cameras.

              If you  insist to get an example based on FX3, you could refer to AN75779.

              http://www.cypress.com/documentation/application-notes/an75779-how-implement-image-sensor-interface-using-ez-usb-fx3-usb

              1 of 1 people found this helpful