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.

Question on OMAP3530 ISP and CMOS parallel Camera module

Other Parts Discussed in Thread: OMAP3530

Hello everyone!

          Recently I get a parallel interface camera module (the sensor is OV5640) and I've finished writing the custom driver (based on arch/arm/mach-omap2/board-omap3beagle-camera.c and driver/media/video/mt9t112.c).

          When I got the pix data using the V4L2 API,I found two problems.

         1:  

            When I check the pix data using the UltraEdit ,I find that the pix data arrangment is so strange.The arrangement I got is 0 Y0 0 U0 0 Y1 0 V0 0 Y2 0 U2 0 Y3 0 V2.

         2:

            Time it takes to shoot a picture is about 12 seconds.And nearly 10 seconds is used to respond to HS_VS_IRQ 、CCDC_VD1_IRQ 、CCDC_VD0_IRQ 、CCDC_LSC_DONE interrupts.

             Now ,I don't know how to get the pix data whose data arrangement is Y0 U0 Y1 V0 Y2 U2 Y3 V2 and reduce the time of responding to the interrupts mentioned above.

              Can you give me some advice ?

  • Hi Mario Liu,

    This looks there is problem with the memory pointer you have used for saving the image buffer. Is the memory pointer that you are using is of unsigned char type? If not, change your memory pointer to unsigned char * and try out.

    Regarding your 2nd question, are you interested in doing LSC process? If not so, try disabling that interrupt and try out. What is the frequency of Master clock you are giving to the sensor?

    Regards,

    Sathya Kumar P

  • Hi Sathya Kumar P,

    I‘m sorry to reply to you so late.

    According to your reply , I check my code and find the type of  image buffer is unsigned char type. I use the oscilloscope and test waveforms , then I find the master clock is 23.56Mhz .

    Recently I am checking the configuration of related constructs. I check the struct isp_interface_config  ( which is defined in drivers/media/video/isp/isp.h)  and the struct v4l2_ifparm  ( which is defined in include/media/v4l2-int-device.h)  ,  and the  configuration of the two struct is shown below.

    static struct isp_interface_config ov5640_if_config = {
               .ccdc_par_ser = ISP_PARLL,
               .dataline_shift = 0x0,
               .hsvs_syncdetect = ISPCTRL_SYNC_DETECT_VSRISE,
               .strobe = 0x0,
               .prestrobe = 0x0,
               .shutter = 0x0,
               .pixelclk = ISP_OV5640_MCLK,
               .wenlog = ISPCCDC_CFG_WENLOG_AND,
               .wait_hs_vs = 2 ,
              //.pixelclk = 1;
              //.jpeg_mod = 1,
                .u.par.par_bridge = 0x0,
                .u.par.par_clk_pol = 0x0,
       };
    static struct v4l2_ifparm ov5640_ifparm_s = {
                   .if_type = V4L2_IF_TYPE_YCbCr,
                                 .u = {
                                          .ycbcr = {
                                                          .frame_start_on_rising_vs = 1,
                                                          .bt_sync_correct = 0,
                                                          .swap = 0,
                                                          .latch_clk_inv = 0,
                                                          .nobt_hs_inv = 0,             //hs active high 
                                                          .nobt_vs_inv = 0,             //vs active high
                                                          .clock_min = OV5640_CLK_MIN,
                                                          .clock_max = OV5640_CLK_MAX,
                                                         },
                                        },
                 };
    Now I know the two struct is related with the ISP_CTRL register and the colck configuration. And the two struct's configuration must mach the processor's condition. Shamely when I read the BSP code and the TRM  ( Literature Number: SPRUGN4N ), I find I am not able to confirm  wheather my struct  configuration is right .  My processor  has 8 data bits and the 8 data bits are  linked to the cam_d[0:7] of  omap3530, and I don't use the srobe and wen pin of omap3530 . And I want to get YUV422 data from processor.
    Could you help me confirm whether the configuration is right or not,especially the dataline_shift = 0x0,  and .wenlog = ISPCCDC_CFG_WENLOG_AND.
    Thank you !
  • Mario,

    You've to enable CCDC_SYN_MODE->PACK8 bit, if I guess right.

  • Yes ,  you are right.

  • Mario,

    Glad that this is resolved. Please mark the post as answered.