6 Replies Latest reply on Nov 23, 2016 5:26 PM by kexu_1593951

    UVC Extension Unit Example

      Can anyone point me to an example of a UVC Extension Unit implementation in the firmware?


      I would just like to implement a Sensor register read/write.


      I think I understand modifying the UVC descriptor, but where does the code go?


      Does it go in the callback code along with Brightness etc..?


      If so, what is the request type etc.. so that I can differentiate it?


      Thanks, I am a newbie here. I appreciate the help.

        • 1. Re: UVC Extension Unit Example

          For a sensor read/write for control purpose you need to use the Processing unit Descriptor. Please refer to the example project with AN75779 Application note.


          In the cyfxuvcdscr.c file, in the processing unit descriptor, you will see that the brightness control bit is set. From this, the host Applicaiton (video player) understands that the device supports brightness control. When the brightness is adjusted in the video pleayer, the corresponding callback code is shown in the UVCHandleProcessingUnitRqts function in uvc.c file. In that function, you can see SensorGetBrightness () and SensorSetBrightness () functions which reads / writes sensor registers using I2C. 


          Please refer this and implement controls in your application.




          -Madhu Sudhan

          • 2. Re: UVC Extension Unit Example

            Madhu, Tanks for your response!


            My question was about UVC extension unit which is different from the canned Brightness, Contrast, Hue Etc...


            I am wanting to add custom vendor specific funtionality, say turn on test bars, for example.





            • 3. Re: UVC Extension Unit Example

              Yes, I also want to know how the UVC extension unit works!  I want to add some customized commands,e.g. LED PWM control (from PC to CX3) and Button inputs on camera(from CX3 to PC).



              • 4. Re: UVC Extension Unit Example

                Hi everyone,


                I'm interested in know how to use UVC extension unit. I think it could be very useful for example to enable the test mode of my cmos sensor, or for example to have the possibility to enable the special effects like, monochrome, sepia, negative,.. etc.


                Has anyone achieved to manage with the UVC extension unit?




                Best regards.

                • 5. Re: UVC Extension Unit Example

                  I have the same problem,I refer to AN75779,It has a debug interface,I add a new ep as AN75779 to my code,


                  But I don't know where and how to add rx/tx code to it.


                  Can someone know what to do with it?

                  • 6. Re: UVC Extension Unit Example

                    I add a new EP and route the data to FX3.CPU with a DMA. 


                    The FX3.CPU decodes the content in the EP and execute the codes contained in the content, including r/w I2C, modify & commit the content to another DMA which allows FPGA to read etc.