Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Steps to Setup up MIPI CSI Camera Solution with CX3

Steps to Setup up MIPI CSI Camera Solution with CX3

Community-Team
Employee
Employee
50 questions asked 10 questions asked 5 questions asked

What are the general steps to setup up MIPI camera solution with CX3?

- CX3 is a MIPI CSI-2 to super speed USB bridge controller. The physical layer of CX3 is D-PHY. Consequently, CX3 could interface with MIPI CSI-2 sensors but not MIPI CSI-3 sensors. For more details, see the CX3 datasheet.

The configuration tool helps you to setup a new project template from the scratch. You could modify the project to implement other applications basing on this template. In addition, you can use the tool to check the values when adding a new resolution to the previous project.

Follow these steps to setup MIPI camera solution with CX3:

1. Open the EZ-USB® SDK. Click Create New CX3 Configuration icon to open the CX3 configuration tool.

                                       pastedImage_1.png

2. In the CX3 Configuration dialog, select the Create a Configuration with Basic Settings option.

3. Enter the project name in the Create New Project field.


                                                   pastedImage_4.png

4. Click Finish. A new project will appear in the explorer panel with blank MIPI configuration.


pastedImage_6.png

5. In the Image Sensor Configuration tab, enter the following details in the Sensor Configuration section:

THS-Prepare and THS-Zero: These values are defined in the MIPI CSI-2 D-PHY specification. Contact the sensor vendor for the correct values.
Input Video Format: This value is used to identify the data format from image sensor or ISP.
▪ Output Video Format: This value is used to choose whether 16-bit or 24-bit parallel data bus is used inside CX3.

6. Enter the parameters necessary for a new resolution in the Frame Configuration section.


pastedImage_21.png

7. Go to the CX3 Receiver Configuration tab. The entered values are displayed. To modify the values, go to the Image Sensor Configuration tab.


pastedImage_24.png8. The next step is to configure the MIPI CSI-2 block clocks. Fill in the details in the CX3 MIPI Interface Configuration section. Make sure the values are within the specified range. These values will be applied to configure PLL of CX3.
For more information, see section 1.7 of EZ-USB® CX3 Technical Reference Manual (TRM). You can also find the TRM in the EZ-USB FX3 SDK installation path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware.


                                                         pastedImage_26.png

9. Go to each tab and check the generated files.


pastedImage_27.png

Four files are created:

       cyu3mipicsi.c consists of the structure(s) CyU3PMipicsiCfg_t which will be used to configure the PLL of CX3 according to the required resolution(s).
       cycx3_uvcdscr.c is the descriptor file, which includes the structures for communication with the host.
       cycx3_uvc.h is the required header file.
       cycx3_uvc.c includes all codes to enumerate CX3 as an UVC device, initialize CX3, and start/stop video streaming.

The cyu3imgasensor.c and cyu3imgagesensor.h are also created and saved in this project. The cyu3imagesensor.c file is used to configure and control the image sensor. In this file, some structures are defined without a valid value. You need to replace these values with actual settings. Generally used APIs such as CyCx3_ImageSensor_Sleep, CyCx3_ImageSensor_Wakeup, and CyCx3_ImageSensor_Trigger_Autofocus are also available the cyu3imagesensor.c and cyu3imagesensor.h files Add the corresponding codes into these definitions.


                                                                                                  pastedImage_30.png

10. Save the files generated by the configuration tool.


pastedImage_32.png


While saving, existing files (if any) will be overwritten.


                                      pastedImage_33.png


11. Save and build the project. EZ-USB SDK should generate an image file. If the build, generation of the image file, or both fail, check the console output message to locate the root cause.


                                        pastedImage_34.png

 

Author: YangyangC_06           Version: **.

Translation - Japanese: CX3でMIPI CSIカメラソリューションをセットアップする手順 – KBA225748 - Community Translated (JA)

7211 Views