This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM3730EVM + ov5640

Other Parts Discussed in Thread: DM3730

Hello.


I have problem using ov5640 module from e-consystems on dm3730 EVM.

Driver is from https://gitorious.org/ap-module-dm37/kernel/source/b82d1037321bb17f6c6873cfa42c2c94f7a1b009:drivers/media/video/ov5640.c and kernel is 2.6.37 from DVSDK 4.03.06.

I included driver in kernel and modified file board-omap3evm-camera.c adding configuration for ov5640.

static struct isp_v4l2_subdevs_group omap3evm_camera_subdevs[] = {
  {
        .subdevs = omap3evm_ov5640_subdevs,
        .interface = ISP_INTERFACE_PARALLEL,
        .bus = {
            .parallel = {
                .data_lane_shift    = 1,
                .clk_pol        = 0,
                .hdpol            = 0,
                .vdpol            = 0,
                .fldmode        = 0,
                .bridge            = 3,
                .is_bt656        = 0,
            },
        },
    },    
    { NULL, 0 },
};


Sensor is visible on I2C bus.

ov5640 2-003c: ov5640 found at 0x78 (OMAP I2C adapter)

Path is set with following command:

media-ctl -r -l '"ov5640 2-003c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'

media-ctl --set-format '"ov5640 2-003c":0 [UYVY 640x480]'


When try to use yavta tool to capture frames I got this message and after that nothing.

root@dm37x-evm:~# yavta -p -f UYVY -s 640x480 -n 1 --capture=10 -F `media-ctl -e
 "OMAP3 ISP CCDC output"` --file=img#.uyvy                                                                                          
[   34.682769] omap_device: omap_i2c.2: new worst case activate latency 0: 61035                                                    
Device /dev/video2 opened.                                                                                                          
Device `OMAP3 ISP CCDC output' on `media' is a video capture device.                                                                
Video format set: UYVY (59565955) 640x480 buffer size 614400                                                                        
Video format: UYVY (59565955) 640x480 buffer size 614400                                                                            
1 buffers requested.                                                                                                                
length: 614400 offset: 0                                                                                                            
Buffer 0 mapped at address 0x40210000.                                                                                              
Press enter to start capture      

Has anyone successfully used this module on dm3730evm and with which what kernel and driver?

Thanks in advance.

  • Hi Vojislav,

    I only guess the reason for the error should not be due to the patch but should be have some inaccurasy with the yavta usage. Could you try the examples from the linked below article:

    https://www.gitorious.org/omap4-v4l2-camera/pages/Home

    BR

    Tsvetolin SHulev

  • Hello Tsvetolin.

    Thanks for a answer.


    I successfully implemented basic driver functions for VGA mode.

    Starting point for development was driver from

    https://gitorious.org/ap-module-dm37/kernel/source/b82d1037321bb17f6c6873cfa42c2c94f7a1b009:drivers/media/video/ov5640.c

    After adding additional controls about formats get/set/enum in driver space I'm able to use yavta tool for capturing frames and gstreamer for preview. Also after modification of DMAI capture.c I can use video_loopback application from DMAI.

    My next step is to implement other resolutions and frame rates in driver.

    Do you have example of correct register setting for different resolutions and framerates?

    Is there source code of driver which I can port to my kernel with correct register settings?

    Do you have application notes for ov5640?

    Thanks in advance.

    Vojislav

  • Hi Vojislav,

    You can read about the registers and configuration of the OV5640 sensor in the linked datasheet below:

    http://www.infopoort.nl/images/7/7e/KLT-OV5640_CSP3_DS.pdf

    For example registers 0x3808 and 0x3809 sets X_output_size and 0x380A and 0x380B sets Y_output_size. Section 4 Image sensor core digital function gives you description of the important registers for image window and many more.

    Using the datasheet you could modify the driver according your specific requirements.

    BR

    Tsvetolin Shulev

  • Hello Tsvetolin.

    I already have datasheet for ov5640.

    There are application notes with register settings for ov5640 but it is hard to get them.

    Thanks for answer.

    Regards.