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.

IMX035 raw bayer sensor 16bit configuration on DM368

Hello,

i am trying to configure IMX035 1.3 Mega sensor on DM368 based camera.

i made

fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR16;  in capture.c inside dvsdk.

and in kernel i selcted decoder as WN1 in the video capture adapter type via menu config.

and data_pack to 16 bit, ccdc_data_pack data_pack = CCDC_DATA_PACK16; // inside kernel ccdc_dm365.c

ccdc_module_params ccdc_module_defaults

compress = {
  .alg = CCDC_NO_COMPRESSION, //CCDC_ALAW,

}

Device initilazation all happening properly , but when Capture_get() call is happening inside DVSDK1.10.00.18

capture thread is getting blocked.

I debugged and found that the interrupt is not getting generated. its not entering inside

vpfe_isr() routine in davinci_vpfe.c.

i tryed to change VDINT0, VDINT1 to image height -1 inside ccdc_setwin() function at ccdc_dm365.c

vert_nr_lines1 = image_win->height - 1;
 ccdc_write(vert_nr_lines, VDINT0);
 ccdc_write(vert_nr_lines, VDINT1);

but still its not generating the interrupt.

my ISIF register setting as below.

----------------------------------------------------------------------

 

----------------------------------------------------------------

./readl 0x01c71000 0x0 0x1ff

00000 00000003 00000000 00000000 00000000

00010 00000000 00000000 00000001 000004FF

00020 00000000 00000001 000003FF 0000FFFF

00030 000000FF 00000028 00000000 00000404

00040 00000000 00000000 00000000 00004E4E

00050 00000200 00000200 00000200 00000200

00060 00000000 00000000 00000000 00000000

00070 000003FF 000003FF 00000000 00000001

00080 00000009 00000000 00000002 00000000

00090 00000000 00000000 00000000 00000000

000A0 00000000 00000000 00000000 00000000

000B0 00000000 00000000 00000000 00000000

000C0 00000000 00000000 00000000 00000000

000D0 00000000 00000000 00000000 00000000

000E0 00000000 00000000 00000000 00000000

000F0 00000000 00000000 00000000 00000000

00100 00000000 00000000 00000000 00000000

00110 00000000 00000000 00000000 00000000

00120 00000000 00000000 00000000 00000000

00130 00000000 00000000 00000000 00000000

00140 00000000 00000000 00000000 00000000

00150 00000000 00000000 00000000 00000000

00160 00000000 00000000 00000000 00000000

00170 00000000 00000000 00000000 00000000

00180 00000000 00000000 00000000 00000000

00190 00000000 00000000 00000000 00000000

001A0 00000000 00000000 00000000 00000000

001B0 00000000 00000000 00000000 00000000

001C0 00000000 00000000 00000000 00000000

001D0 00000000 00000000 00000000 00000000

001E0 00000000 00000000 00000000 00000000

001F0 00000000 00000000 00000000 00000000

00200 00000000 00000000 00000000 00000000

00210 00000000 00000000 00000000 00000000

00220 00000000 00000010 00000200 00000000

00230 00000000 00000000 00000FFF 00000000

00240 00000001 00000000 00000000 00000000

00250 00000FFF 00000010 00000000 00000000

00260 00000000 00000000 00000000 00000000

00270 00000000 00000000 00000000 00000000

00280 00000000 00000000 00000000 00000000

00290 00000000 00000000 00000000 00000000

002A0 00000000 00000000 00000000 00000000

002B0 00000000 00000000 00000000 00000000

002C0 00000000 00000000 00000000 00000000

002D0 00000000 00000000 00000000 00000000

002E0 00000000 00000000 00000000 00000000

002F0 00000000 00000000 00000000 00000000

00300 00000000 00000000 00000000 00000000

00310 00000000 00000000 00000000 00000000

00320 00000000 00000000 00000000 00000000

00330 00000000 00000000 00000000 00000000

00340 00000000 00000000 00000000 00000000

00350 00000000 00000000 00000000 00000000

00360 00000000 00000000 00000000 00000000

00370 00000000 00000000 00000000 00000000

00380 00000000 00000000 00000000 00000000

00390 00000000 00000000 00000000 00000000

003A0 00000000 00000000 00000000 00000000

003B0 00000000 00000000 00000000 00000000

003C0 00000000 00000000 00000000 00000000

003D0 00000000 00000000 00000000 00000000

003E0 00000000 00000000 00000000 00000000

003F0 00000000 00000000 00000000 00000000

00400 4D010000 FFC007F8 00000000 00000000

00410 00000000 00000000 00000000 00000000

00420 00000000 00000000 00000000 00000000

00430 00000000 00000000 00000000 00000000

00440 00000000 00000000 00000000 00000000

00450 00000000 00000000 00000000 00000000

00460 00000000 00000000 00000000 00000000

00470 00000000 00000000 00000000 00000000

00480 4D010000 FFC007F8 00000000 00000000

00490 00000000 00000000 00000000 00000000

004A0 00000000 00000000 00000000 00000000

004B0 00000000 00000000 00000000 00000000

004C0 00000000 00000000 00000000 00000000

004D0 00000000 00000000 00000000 00000000

004E0 00000000 00000000 00000000 00000000

004F0 00000000 00000000 00000000 00000000

00500 00000000 00000000 00000000 00000000

00510 00000000 00000000 00000000 00000000

00520 00000000 00000000 00000000 00000000

00530 00000000 00000000 00000000 00000000

00540 00000000 00000000 00000000 00000000

00550 00000000 00000000 00000000 00000000

00560 00000000 00000000 00000000 00000000

00570 00000000 00000000 00000000 00000000

00580 00000000 00000000 00000000 00000000

00590 00000000 00000000 00000000 00000000

005A0 00000000 00000000 00000000 00000000

005B0 00000000 00000000 00000000 00000000

005C0 00000000 00000000 00000000 00000000

005D0 00000000 00000000 00000000 00000000

005E0 00000000 00000000 00000000 00000000

005F0 00000000 00000000 00000000 00000000

00600 0024FE05 00000000 00000000 00000000

00610 00000000 00000000 00000000 00000000

00620 00000000 00000000 00000000 00000000

00630 00000000 00000000 00000000 00000000

00640 000026F1 00001000 00000000 00001000

00650 00001000 00001000 00001000 00001000

00660 00001000 00001000 00001000 00001000

00670 00001000 00001000 00001000 00001000

00680 00001000 00001000 00001000 00001000

00690 00001000 00001000 00001000 00001000

006A0 00001000 00001000 00001000 00001000

006B0 00001000 00001000 00001000 00001000

006C0 00001000 00001000 00001000 00001000

006D0 00001000 00001000 00001000 00001000

006E0 00001000 00001000 00001000 00001000

006F0 00001000 00001000 00001000 00001000

00700 00000000 00000000 00000000 00000000

00710 00000000 00000000 00000000 00000000

00720 00000000 00000000 00000000 00000000

00730 00000000 00000000 00000000 00000000

00740 00000000 00000000 00000000 00000000

00750 00000000 00000000 00000000 00000000

00760 00000000 00000000 00000000 00000000

00770 00000000 00000000 00000000 00000000

00780 00000000 00000000 00000000 00000000

00790 00000000 00000000 00000000 00000000

007A0 00000000 00000000 00000000 00000000

007B0 00000000 00000000 00000000 00000000

007C0 00000000 00000000 00000000 00000000

007D0 00000000 00000000 00000000 00000000

007E0 00000000 00000000 00000000 00000000

007F0 00000000 00000000 00000000

  • For interrupts to happen, sensor and ccdc should be in sync. Can you check from sensor side whether configuration is happening fine?

  • Hi Nagabhushana,

    thanks for your reply.

    There was a typo mistake in my last post, my sensor is IMC036 not 035.

    As you said i am checked the IMAX036 datasheet, and i found register 00h had default value as 1 at reset.

    1 STANDBY Standby

    0: Operating

     

     

     to make it on operating some how i have to send a value 0 to get capture data.

    but don't know how to send signal to make it in operating mode.

     

  • I am not aware of above said 'sensor'. You can check things like - whether streamon() is getting called in sensor? If called, what is the status of the sensor at the end of streamon?

  • IPNC is using Sony IMX036 only.

    Streamon is being called .

    it is getting blocked after making Capture_get() call.

    and reason is interrupt not getting generated.

  • Hello,

    i have configured the IMX035 RawBayer 12 bit sensor with DM368.

    But i am  getting some junk image.

    May be i have not set the color space and resizer properly. What should be the color space for 12 bit RAW Bayer data ?

    i have set in DVSDK Capture.c  fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR16;

    and for Resizer to understand the input data as RAWBAYER what changes i need to do ?

    As i am checking, the

    rszSSConfig.input.pix_fmt = PixFormatConversion(BufferGfx_getColorSpace(inputBuffer));

    ccdc_data_pack data_pack = CCDC_DATA_PACK16; .alg = CCDC_NO_COMPRESSION,  in ccdc_dm365.c

    comes to be  IPIPE_UYVY, but i think it is wrong.

    if i set it to any other format like IPIPE_BAYER then Resizer configuaration is not happening.

    can you  suggest me what are the configuarions i should do to get proper data.

    I have shared my ISIF reg settings and Resizer registers here with.

  • All he image formats are currently not tested ( although the driver would support configuration to most of them) with the driver but ones which are a part of the EVM. Also, 

    1. You typically would not have t make changes in the core resizer driver but app changes would suffice.

    2. Resizer directly does not take a BAYER form but takes a processed one in form of RGB or YUV. So changes to resizer color formats in the driver might nt be warranted.

    This needs some detailed look in the driver. I will try to help you after some analysis.

    Thx,

    -Manju

  • Dear Manjunath,

    Thanks for your reply. let me tell tell you step by step what changes i have done till now.

    1. IMX035 sensor setting has been done via SPI communication.

    2. In User applkication side Resizer setting for resizer single shot configuration i have tried sevarel input and output combinations

                    rszSSConfig.input.pix_fmt = IPIPE_BAYER;          //  IPIPE_BAYER_8BIT_PACK_DPCM; // IPIPE_BAYER_8BIT_PACK_ALAW; // IPIPE_BAYER_16BIT_PACK

                    rszSSConfig.output1.pix_fmt  =  IPIPE_UYVY; //IPIPE_YUV420SP

                    rszSSConfig.output2.pix_fmt = IPIPE_UYVY; //IPIPE_YUV420SP

    3. in DVSDK side i have tried with V4L2_PIX_FMT_SBGGR8 and   V4L2_PIX_FMT_SBGGR16 

                     fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR8;             // V4L2_PIX_FMT_SBGGR16 //V4L2_PIX_FMT_UYVY;

    4.  Kernel side

    Davinci_vpfe.c

                    vid_capture_interface_type  if_type = INTERFACE_TYPE_RAW

                    ccdc_hw_if_type     vpfe_if =  CCDC_RAW_BAYER;

                    ccdc_hw_if-> set_hw_if_type(CCDC_RAW_BAYER);

    Ccdc_Dm365.c

                    static enum ccdc_data_pack data_pack = CCDC_DATA_PACK12;   //CCDC_DATA_PACK12 // CCDC_DATA_PACK8

                    ccdc_module_params ccdc_module_defaults   .corr_shft = CCDC_4BIT_SHIFT,    //CCDC_NO_SHIFT,

                    .compress = {
                     .alg = CCDC_ALAW, // CCDC_DPCM, //CCDC_NO_COMPRESSION,  }

                    VDINT0 = 0;

    Dm365_ipipe.c       

                   at ipipe_process_pix_fmts() my  data path format comes inside

                                              ipipe_dpaths_fmt = IPIPE_RAW2YUV

                  inside calculate_line_length() i have modified the folling as i was getting error

                                             //if ((pix == IPIPE_UYVY) || (pix == IPIPE_BAYER))
                                             if ((pix == IPIPE_UYVY) || (pix == IPIPE_BAYER) || (pix == IPIPE_BAYER_8BIT_PACK)
                                                  || (pix == IPIPE_BAYER_8BIT_PACK_ALAW) || (pix == IPIPE_BAYER_8BIT_PACK_DPCM)
                                                  || (pix == IPIPE_BAYER_12BIT_PACK))

                 in rsz_validate_input_image_format()

                                            //if (pix != IPIPE_UYVY && pix != IPIPE_420SP_Y && pix != IPIPE_420SP_C) {
                                              if (pix != IPIPE_UYVY
                                                  && pix != IPIPE_420SP_Y
                                                  && pix != IPIPE_420SP_C
                                                  && pix != IPIPE_YUV420SP
                                                  && pix != IPIPE_BAYER
                                                  && pix != IPIPE_BAYER_8BIT_PACK
                                                  && pix != IPIPE_BAYER_8BIT_PACK_ALAW
                                                  && pix != IPIPE_BAYER_8BIT_PACK_DPCM
                                                  && pix != IPIPE_BAYER_12BIT_PACK) {

               inside   configure_resizer_in_ss_mode() 

                                                 ipipeif_param.source = SDRAM_RAW;  /* SDRAM_YUV; */

                                                 ipipe_dpaths_fmt = IPIPE_RAW2YUV;   /* IPIPE_YUV2YUV; */

    Above are my changes till now for my IMX035 12 bit Raw Bayer Sensor. Kindly let me know if some where i went wrong and what else i need to modify further.

    Hope i will get a reply from you soon.

    Thanks.

  • Hi,

    Can anyone have IMX036 and IMX035 sensor datasheet? I can't find from internet. If anyone can help, I will be very appreciated.

    Thanks.

  • Hi,

    I am trying to interface IMX035 sensor with DM365 IPNC. Could any one please advice how to configure SPI.

    Thanks in advance.

    Regards,

    panshi