Zebra-Like Pattern With IMX568

Hello everyone,

I am trying to use IMX568 2-Lane mode but I am getting a weird feed from the camera:

Here are my mode definitions:

static imx568_reg imx568_2472x2064_10bit_41fps_2lane_1188mbps
 = {
{0x3014, 0x05}, // INCKSEL_ST0 (37.125 MHz)
{0x3015, 0x91}, // INCKSEL_ST1
{0x3016, 0x50}, // INCKSEL_ST2
{0x3018, 0x20}, // INCKSEL_ST3
{0x3019, 0x02}, // INCKSEL_ST4
{0x301B, 0x1D}, // INCKSEL_ST5

{0x303C, 0x00}, // HVMODE (all-pixel)

{0x30D0, 0xA8}, // VOPB_VBLK_HWIDTH = 0x09A8
{0x30D1, 0x09},
{0x30D2, 0xA8}, // FINFO_HWIDTH = 0x09A8
{0x30D3, 0x09},

{0x30D4, 0x84}, // VMAX = 0x0884
{0x30D5, 0x08},
{0x30D6, 0x00},

{0x30D8, 0x2A}, // HMAX = 0x032A
{0x30D9, 0x03},

{0x30E2, 0x04}, // GMRWT
{0x30E3, 0x12}, // GMTWT
{0x30E5, 0x02}, // GAINDLY
{0x30E6, 0x08}, // GSDLY

{0x3200, 0x00}, // ADBIT = 10-bit

{0x321C, 0x40}, // INCKSEL_N0
{0x321D, 0x05}, // INCKSEL_N1
{0x321E, 0xE0}, // INCKSEL_N2
{0x321F, 0x00}, // INCKSEL_N3

{0x3224, 0x40}, // INCKSEL_D0
{0x3225, 0x14}, // INCKSEL_D1
{0x3226, 0x80}, // INCKSEL_D2
{0x3227, 0x80}, // INCKSEL_D3

{0x323C, 0x19}, // LLBLANK
{0x323D, 0x00},
{0x323E, 0x30}, // VINT_EN + LLBLANK bits

{0x3430, 0x00}, // ODBIT (10-bit)
{0x3521, 0xED}, // Readout-related
{0x3546, 0x3B}, // Readout-related

{0x35B4, 0x3C}, // BLKLEVEL (10-bit)
{0x35B5, 0x00},

{0x3904, 0x03}, // LANESEL (2-lane)

{0x3CA4, 0x80}, // TXCLKESC_FREQ = 0x0980
{0x3CA5, 0x09},

{0x3CB4, 0x4F}, {0x3CB5, 0x00}, // THS_PREPARE
{0x3CB6, 0x8F}, {0x3CB7, 0x00}, // TCLK_POST
{0x3CB8, 0x4F}, {0x3CB9, 0x00}, // THS_TRAIL
{0x3CBA, 0x87}, {0x3CBB, 0x00}, // THS_ZERO
{0x3CBC, 0x4F}, {0x3CBD, 0x00}, // TCLK_PREPARE
{0x3CBE, 0x47}, {0x3CBF, 0x00}, // TCLK_TRAIL
{0x3CC0, 0x3F}, {0x3CC1, 0x00}, // TLPX
{0x3CC2, 0x37}, {0x3CC3, 0x01}, // TCLK_ZERO
{0x3CC4, 0x0F}, {0x3CC5, 0x00}, // TCLK_PRE
{0x3CC6, 0x7F}, {0x3CC7, 0x00}, // THS_EXIT

{0x3436, 0x00}, // TOUT0 low-fixed

common_mass,

{0x3502, 0x09}, // GAIN_RTS (gain update timing)

{IMX568_TABLE_END, 0x00}

};

mode0 {

                // mode IMX568_MODE_2472X2064_10BIT_41FPS_2LANE_1188MBPS

                mclk_khz = "37125";

                num_lanes = "2";

                tegra_sinterface = "serial_c";

                phy_mode = "DPHY";

                discontinuous_clk = "no";

                dpcm_enable = "false";

                cil_settletime = "0";

                dynamic_pixel_bit_depth = "10";

                csi_pixel_bit_depth = "10";

                mode_type = "bayer";

                pixel_phase = "rggb";   // gbrg rggb bggr grbg




                active_w = "2472";     

                active_h = "2064";     

                readout_orientation = "0";

                line_length = "810";   //HMAX - 32A

                inherent_gain = "1";

                pix_clk_hz = "237600000";            




                gain_factor = "10";

                min_gain_val = "0";

                max_gain_val = "300";

                step_gain_val = "3";

                default_gain = "0";

                min_hdr_ratio = "1";

                max_hdr_ratio = "1";

                framerate_factor = "1";

                min_framerate = "5"; 

                max_framerate = "41"; 

                step_framerate = "1";

                default_framerate = "41";




                exposure_factor = "1000000";

                min_exp_time = "15";

                max_exp_time = "23520";

                step_exp_time = "1";

                default_exp_time = "12000";

                embedded_metadata_height = "1";

            };

Any help would be appreciated.

Hello @mehmetyusuf1414,

That is very interesting.

Is it static ? Or if you move an object in front of the camera, does the patter somehow reflect the movement?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Hello Andrew,

Thank you for your answer and no, it isn’t static. The camera still reacts to infrared as a pink tint follows whenever I point the camera outside (You can see it slightly appear on the left window).

@mehmetyusuf1414,

Thanks for getting back with further details.

That is very interesting.
Looks so perfect I thought could even be a test pattern.

But yes, you right, I see the pink on the left image… did not know what it was.

Don’t mind me asking a few more questions:

  1. You are using MIPI/CSI right ?
  2. Where did you get the driver from ? Specifically the register table configuration?
  3. Does this happen independent of the camera port you are using?
  4. Have you tried capturing using other capture modes?
  5. What happens if you capture with v4l2-ctl into a raw file? Are those values actually white? Or do they hold some value ?
  6. Can you share a few raw buffers captured with v4l2-ctl ?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Hello Andrew,

  1. Yes I am using MIPI/CSI. CSI2-2Lane to be specific.
  2. I made the driver in correlation with the register table configuration.
  3. IMX568 was on CAM1-2 so I can say yes?
  4. I had 3 modes defined and I would get this on mode 1 and mode 2. I wouldn’t get any feed from camera on mode 0. They are defined like this:
mode0 {

                // mode IMX568_MODE_2472X2064_10BIT_41FPS_2LANE_1188MBPS

                mclk_khz = "37125";

                num_lanes = "2";

                tegra_sinterface = "serial_c";

                phy_mode = "DPHY";

                discontinuous_clk = "no";

                dpcm_enable = "false";

                cil_settletime = "0";

                dynamic_pixel_bit_depth = "10";

                csi_pixel_bit_depth = "10";

                mode_type = "bayer";

                pixel_phase = "rggb";   // gbrg rggb bggr grbg




                active_w = "2472";     

                active_h = "2064";     

                readout_orientation = "0";

                line_length = "810";   //HMAX - 32A

                inherent_gain = "1";

                pix_clk_hz = "237600000";            




                gain_factor = "10";

                min_gain_val = "0";

                max_gain_val = "300";

                step_gain_val = "3";

                default_gain = "0";

                min_hdr_ratio = "1";

                max_hdr_ratio = "1";

                framerate_factor = "1";

                min_framerate = "5"; 

                max_framerate = "41"; 

                step_framerate = "1";

                default_framerate = "41";




                exposure_factor = "1000000";

                min_exp_time = "15";

                max_exp_time = "23520";

                step_exp_time = "1";

                default_exp_time = "12000";

                embedded_metadata_height = "1";

            };




mode1 {

// mode IMX568_MODE_2472X2064_10BIT_30FPS_2LANE_891MBPS

                mclk_khz = "37125";

                num_lanes = "2";

                tegra_sinterface = "serial_c";

                phy_mode = "DPHY";

                discontinuous_clk = "no";

                dpcm_enable = "false";

                cil_settletime = "0";

                dynamic_pixel_bit_depth = "10";

                csi_pixel_bit_depth = "10";

                mode_type = "bayer";

                pixel_phase = "rggb";   // gbrg rggb bggr grbg




                active_w = "2472";     

                active_h = "2064";     

                readout_orientation = "0";

                line_length = "1074";   //HMAX - 432h

                inherent_gain = "1";

                pix_clk_hz = "178200000";            




                gain_factor = "10";

                min_gain_val = "0";

                max_gain_val = "300";

                step_gain_val = "3";

                default_gain = "0";

                min_hdr_ratio = "1";

                max_hdr_ratio = "1";

                framerate_factor = "1";

                min_framerate = "5"; 

                max_framerate = "30"; 

                step_framerate = "1";

                default_framerate = "30";




                exposure_factor = "1000000";

                min_exp_time = "20";

                max_exp_time = "33050";

                step_exp_time = "1";

                default_exp_time = "12000";

                embedded_metadata_height = "1";

            };




mode2 {

// mode IMX568_MODE_2472X2064_10BIT_20FPS_2LANE_594MBPS

                mclk_khz = "37125";

                num_lanes = "2";

                tegra_sinterface = "serial_c";

                phy_mode = "DPHY";

                discontinuous_clk = "no";

                dpcm_enable = "false";

                cil_settletime = "0";

                dynamic_pixel_bit_depth = "10";

                csi_pixel_bit_depth = "10";

                mode_type = "bayer";

                pixel_phase = "rggb";   // gbrg rggb bggr grbg




                active_w = "2472";     

                active_h = "2064";     

                readout_orientation = "0";

                line_length = "1588";   //HMAX - 634h

                inherent_gain = "1";

                pix_clk_hz = "118800000";            




                gain_factor = "10";

                min_gain_val = "0";

                max_gain_val = "300";

                step_gain_val = "3";

                default_gain = "0";

                min_hdr_ratio = "1";

                max_hdr_ratio = "1";

                framerate_factor = "1";

                min_framerate = "5"; 

                max_framerate = "20"; 

                step_framerate = "1";

                default_framerate = "20";




                exposure_factor = "1000000";

                min_exp_time = "25";

                max_exp_time = "46460";

                step_exp_time = "1";

                default_exp_time = "15000";

                embedded_metadata_height = "1";

            };
static  imx568_reg imx568_2472x2064_10bit_41fps_2lane_1188mbps[] = {

        {0x3014, 0x05},           //INCKSEL_ST0 -   INCK = 37.125 MHZ   -   05h

        {0x3015, 0x91},           //INCKSEL_ST1 -   INCK = 37.125 MHZ   -   91h

        {0x3016, 0x50},           //INCKSEL_ST2 -   INCK = 37.125 MHZ   -   50h

        {0x3018, 0x20},           //INCKSEL_ST3 -   INCK = 37.125 MHZ   -   20h

        {0x3019, 0x02},           //INCKSEL_ST4 -   INCK = 37.125 MHZ   -   02h

        {0x301B, 0x1D},           //INCKSEL_ST5 -   INCK = 37.125 MHZ   -   1Dh

        {0x303C, 0x00},           //HVMODE      -   Drive mode setting of H/V direction -   0h: All-pixel

        {0x30D0, 0xA8},           //VOPB_VBLK_HWIDTH    -   All Configs -   09A8h

        {0x30D1, 0x09},           //

        {0x30D2, 0xA8},           //FINFO_HWIDTH        -   All Configs -   09A8h

        {0x30D3, 0x09},           //

        {0x30D4, 0x84},           //VMAX        -   1188mbps            -   0008(84)h

        {0x30D5, 0x08},           //VMAX        -   1188mbps            -   00(08)84h

        {0x30D6, 0x00},           //VMAX        -   1188mbps            -   (00)0884h

        {0x30D8, 0x2A},           //HMAX        -   1188mbps            -   03(2A)h

        {0x30D9, 0x03},           //HMAX        -   1188mbps            -   (03)2Ah

        {0x30E2, 0x04},           //GMRWT       -   1188mbps            -   04h

        {0x30E3, 0x12},           //GMTWT       -   1188mbps            -   12h

        {0x30E5, 0x02},           //GAINDLY     -   All Configs         -   02h

        {0x30E6, 0x08},           //GSDLY       -   1188mbps            -   08h

        {0x3200, 0x00},           //ADBIT       -   10bit               -   0h

        {0x321C, 0x40},           //INCKSEL_N0  -   37.125MHz           -   40h   

        {0x321D, 0x05},           //INCKSEL_N1  -   All Configs         -   05h

        {0x321E, 0xE0},           //INCKSEL_N2  -   37.125MHz           -   E0h

        {0x321F, 0x00},           //INCKSEL_N3  -   37.125MHz           -   00h




        {0x3224, 0x40},           //INCKSEL_D0  -   37.125MHz           -   40h

        {0x3225, 0x14},           //INCKSEL_D1  -   All Configs         -   14h

        {0x3226, 0x80},           //INCKSEL_D2  -   37.125MHz&1188mbps! -   80h  

        {0x3227, 0x80},           //INCKSEL_D3  -   1188mbps            -   80h

        {0x323C, 0x19},           //LLBLANK     -   All Configs         -   19h     // VINT_EN register has been squeezed in for the first two bits of 323E

        {0x323D, 0x00},           //                                                // Set first two bits for VINT_EN, rest for LLBLANK. LLBLANK needs 0Ch.

        {0x323E, 0x30},           //                                                // 0 0 1 1 0 0 / 0 0 --> Can't touch first two, leaves us with 0x30.

        {0x3430, 0x00},           //ODBIT       -   10 bit              -   0h

        {0x3521, 0xED},           //???         -   All Configs (?)     -   EDh     // Check "Readout Mode" in datasheet

        {0x3546, 0x3B},           //???         -   All Configs (?)     -   3Bh     // Check "Readout Mode" in datasheet

        {0x35B4, 0x3C},           //BLKLEVEL    -   10 bit              -   3Ch

        {0x35B5, 0x00},           //

        {0x3904, 0x03},           //LANESEL     -   2-Lane              -   03h

        {0x3CA4, 0x80},           //TXCLKESC_FREQ - 37.125MHz           -   09(80)h 

        {0x3CA5, 0x09},           //TXCLKESC_FREQ - 37.125MHz           -   (09)80h 

        {0x3CB4, 0x4F},           //THS_PREPARE -   1188mbps            -   00(4F)h

        {0x3CB5, 0x00},           //THS_PREPARE -   1188mbps            -   (00)4Fh

        {0x3CB6, 0x8F},           //TCLK_POST   -   1188mbps            -   00(8F)h

        {0x3CB7, 0x00},           //TCLK_POST   -   1188mbps            -   (00)8Fh

        {0x3CB8, 0x4F},           //THS_TRAIL   -   1188mbps            -   00(4F)h

        {0x3CB9, 0x00},           //THS_TRAIL   -   1188mbps            -   (00)4Fh

        {0x3CBA, 0x87},           //THS_ZERO    -   1188mbps            -   00(87)h

        {0x3CBB, 0x00},           //THS_ZERO    -   1188mbps            -   (00)87h

        {0x3CBC, 0x4F},           //TCLK_PREPARE-   1188mbps            -   00(4F)h

        {0x3CBD, 0x00},           //TCLK_PREPARE-   1188mbps            -   (00)4Fh

        {0x3CBE, 0x47},           //TCLK_TRAIL  -   1188mbps            -   00(47)h

        {0x3CBF, 0x00},           //TCLK_TRAIL  -   1188mbps            -   (00)47h

        {0x3CC0, 0x3F},           //TLPX        -   1188mbps            -   00(3F)h

        {0x3CC1, 0x00},           //TLPX        -   1188mbps            -   (00)3Fh

        {0x3CC2, 0x37},           //TCLK_ZERO   -   1188mbps            -   01(37)h

        {0x3CC3, 0x01},           //TCLK_ZERO   -   1188mbps            -   (01)37h

        {0x3CC4, 0x0F},           //TCLK_PRE    -   1188mbps            -   00(0F)h

        {0x3CC5, 0x00},           //TCLK_PRE    -   1188mbps            -   (00)0Fh

        {0x3CC6, 0x7F},           //THS_EXIT    -   1188mbps            -   00(7F)h

        {0x3CC7, 0x00},           //THS_EXIT    -   1188mbps            -   (00)7Fh

        {0x3436, 0x00},           //TOUT0 pin setting 0h: Low fixed




common_mass,




        /* {0x3240, 0x29},     //SHS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

        {0x3241, 0x0C},

        {0x3242, 0x00}, */




        {0x3502, 0x09},   //GAIN_RTS 9 - gain reflect at the next frame




        {IMX568_TABLE_END, 0x00}

};




static  imx568_reg imx568_2472x2064_10bit_30fps_2lane_891mbps[] = {

        {0x3014, 0x05},           //INCKSEL_ST0 -   INCK = 37.125 MHZ   -   05h

        {0x3015, 0x91},           //INCKSEL_ST1 -   INCK = 37.125 MHZ   -   91h

        {0x3016, 0x50},           //INCKSEL_ST2 -   INCK = 37.125 MHZ   -   50h

        {0x3018, 0x20},           //INCKSEL_ST3 -   INCK = 37.125 MHZ   -   20h

        {0x3019, 0x02},           //INCKSEL_ST4 -   INCK = 37.125 MHZ   -   02h

        {0x301B, 0x1D},           //INCKSEL_ST5 -   INCK = 37.125 MHZ   -   1Dh

        {0x303C, 0x00},           //HVMODE      -   Drive mode setting of H/V direction -   0h: All-pixel

        {0x30D0, 0xA8},           //VOPB_VBLK_HWIDTH    -   All Configs -   09A8h

        {0x30D1, 0x09},           //

        {0x30D2, 0xA8},           //FINFO_HWIDTH        -   All Configs -   09A8h

        {0x30D3, 0x09},           //

        {0x30D4, 0x7C},           //VMAX        -   891mbps             -   0008(7C)h

        {0x30D5, 0x08},           //VMAX        -   891mbps             -   00(08)7Ch

        {0x30D6, 0x00},           //VMAX        -   891mbps             -   (00)087Ch

        {0x30D8, 0x32},           //HMAX        -   891mbps             -   04(32)h

        {0x30D9, 0x04},           //HMAX        -   891mbps             -   (04)32h

        {0x30E2, 0x02},           //GMRWT       -   891mbps             -   02h

        {0x30E3, 0x0E},           //GMTWT       -   891mbps             -   0Eh

        {0x30E6, 0x06},           //GSDLY       -   891mbps             -   06h

        {0x3200, 0x00},           //ADBIT       -   10bit               -   0h

        {0x321C, 0x40},           //INCKSEL_N0  -   37.125MHz           -   40h   

        {0x321D, 0x05},           //INCKSEL_N1  -   All Configs         -   05h

        {0x321E, 0xE0},           //INCKSEL_N2  -   37.125MHz           -   E0h

        {0x321F, 0x00},           //INCKSEL_N3  -   37.125MHz           -   00h




        {0x3224, 0x40},           //INCKSEL_D0  -   37.125MHz           -   40h

        {0x3225, 0x14},           //INCKSEL_D1  -   All Configs         -   14h

        {0x3226, 0xC0},           //INCKSEL_D2  -   37.125MHz&891mbps!  -   C0h  

        {0x3227, 0xD0},           //INCKSEL_D3  -   891mbps             -   D0h

        {0x323C, 0x19},           //LLBLANK     -   All Configs         -   19h     // VINT_EN register has been squeezed in for the first two bits of 323E

        {0x323D, 0x00},           //                                                // Set first two bits for VINT_EN, rest for LLBLANK. LLBLANK needs 0Ch.

        {0x323E, 0x30},           //                                                // 0 0 1 1 0 0 / 0 0 --> Can't touch first two, leaves us with 0x30.

        {0x3430, 0x00},           //ODBIT       -   10 bit              -   0h

        {0x3521, 0xED},           //???         -   All Configs (?)     -   EDh     // Check "Readout Mode" in datasheet

        {0x3546, 0x3B},           //???         -   All Configs (?)     -   3Bh     // Check "Readout Mode" in datasheet

        {0x35B4, 0x3C},           //BLKLEVEL    -   10 bit              -   3Ch

        {0x35B5, 0x00},           //

        {0x3904, 0x03},           //LANESEL     -   2-Lane              -   03h

        {0x3CA4, 0x80},           //TXCLKESC_FREQ - 37.125MHz           -   09(80)h 

        {0x3CA5, 0x09},           //TXCLKESC_FREQ - 37.125MHz           -   (09)80h 

        {0x3CB4, 0x3F},           //THS_PREPARE -   891mbps             -   00(3F)h

        {0x3CB5, 0x00},           //THS_PREPARE -   891mbps             -   (00)3Fh

        {0x3CB6, 0x7F},           //TCLK_POST   -   891mbps             -   00(7F)h

        {0x3CB7, 0x00},           //TCLK_POST   -   891mbps             -   (00)7Fh

        {0x3CB8, 0x3F},           //THS_TRAIL   -   891mbps             -   00(3F)h

        {0x3CB9, 0x00},           //THS_TRAIL   -   891mbps             -   (00)3Fh

        {0x3CBA, 0x6F},           //THS_ZERO    -   891mbps             -   00(6F)h

        {0x3CBB, 0x00},           //THS_ZERO    -   891mbps             -   (00)6Fh

        {0x3CBC, 0x37},           //TCLK_PREPARE-   891mbps             -   00(37)h

        {0x3CBD, 0x00},           //TCLK_PREPARE-   891mbps             -   (00)37h

        {0x3CBE, 0x37},           //TCLK_TRAIL  -   891mbps             -   00(37)h

        {0x3CBF, 0x00},           //TCLK_TRAIL  -   891mbps             -   (00)37h

        {0x3CC0, 0x2F},           //TLPX        -   891mbps             -   00(2F)h

        {0x3CC1, 0x00},           //TLPX        -   891mbps             -   (00)2Fh

        {0x3CC2, 0xF7},           //TCLK_ZERO   -   891mbps             -   00(F7)h

        {0x3CC3, 0x00},           //TCLK_ZERO   -   891mbps             -   (00)F7h

        {0x3CC4, 0x0F},           //TCLK_PRE    -   891mbps             -   00(0F)h

        {0x3CC5, 0x00},           //TCLK_PRE    -   891mbps             -   (00)0Fh

        {0x3CC6, 0x5F},           //THS_EXIT    -   891mbps             -   00(5F)h

        {0x3CC7, 0x00},           //THS_EXIT    -   891mbps             -   (00)5Fh

        {0x3436, 0x00},           //TOUT0 pin setting 0h: Low fixed




common_mass,




        /* {0x3240, 0x29},     //SHS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

        {0x3241, 0x0C},

        {0x3242, 0x00}, */




        {0x3502, 0x09},   //GAIN_RTS 9 - gain reflect at the next frame




        {IMX568_TABLE_END, 0x00}

};




static  imx568_reg imx568_2472x2064_10bit_20fps_2lane_594mbps[] = {

        {0x3014, 0x05},           //INCKSEL_ST0 -   INCK = 37.125 MHZ   -   05h

        {0x3015, 0x91},           //INCKSEL_ST1 -   INCK = 37.125 MHZ   -   91h

        {0x3016, 0x50},           //INCKSEL_ST2 -   INCK = 37.125 MHZ   -   50h

        {0x3018, 0x20},           //INCKSEL_ST3 -   INCK = 37.125 MHZ   -   20h

        {0x3019, 0x02},           //INCKSEL_ST4 -   INCK = 37.125 MHZ   -   02h

        {0x301B, 0x1D},           //INCKSEL_ST5 -   INCK = 37.125 MHZ   -   1Dh

        {0x303C, 0x00},           //HVMODE      -   Drive mode setting of H/V direction -   0h: All-pixel

        {0x30D0, 0xA8},           //VOPB_VBLK_HWIDTH    -   All Configs -   09A8h

        {0x30D1, 0x09},           //

        {0x30D2, 0xA8},           //FINFO_HWIDTH        -   All Configs -   09A8h

        {0x30D3, 0x09},           //

        {0x30D4, 0x76},           //VMAX        -   594mbps             -   0008(76)h

        {0x30D5, 0x08},           //VMAX        -   594mbps             -   00(08)76h

        {0x30D6, 0x00},           //VMAX        -   594mbps             -   (00)0876h

        {0x30D8, 0x43},           //HMAX        -   594mbps             -   06(43)h

        {0x30D9, 0x06},           //HMAX        -   594mbps             -   (06)43h

        {0x30E2, 0x02},           //GMRWT       -   594mbps             -   02h

        {0x30E3, 0x0A},           //GMTWT       -   594mbps             -   0Ah

        {0x30E6, 0x04},           //GSDLY       -   594mbps             -   04h

        {0x3200, 0x00},           //ADBIT       -   10bit               -   0h

        {0x321C, 0x40},           //INCKSEL_N0  -   37.125MHz           -   40h   

        {0x321D, 0x05},           //INCKSEL_N1  -   All Configs         -   05h

        {0x321E, 0xE0},           //INCKSEL_N2  -   37.125MHz           -   E0h

        {0x321F, 0x00},           //INCKSEL_N3  -   37.125MHz           -   00h




        {0x3224, 0x40},           //INCKSEL_D0  -   37.125MHz           -   40h

        {0x3225, 0x14},           //INCKSEL_D1  -   All Configs         -   14h

        {0x3226, 0x80},           //INCKSEL_D2  -   37.125MHz&594mbps!  -   80h  

        {0x3227, 0x90},           //INCKSEL_D3  -   891mbps             -   90h

        {0x323C, 0x19},           //LLBLANK     -   All Configs         -   19h     // VINT_EN register has been squeezed in for the first two bits of 323E

        {0x323D, 0x00},           //                                                // Set first two bits for VINT_EN, rest for LLBLANK. LLBLANK needs 0Ch.

        {0x323E, 0x30},           //                                                // 0 0 1 1 0 0 / 0 0 --> Can't touch first two, leaves us with 0x30.

        {0x3430, 0x00},           //ODBIT       -   10 bit              -   0h

        {0x3521, 0xED},           //???         -   All Configs (?)     -   EDh     // Check "Readout Mode" in datasheet

        {0x3546, 0x3B},           //???         -   All Configs (?)     -   3Bh     // Check "Readout Mode" in datasheet

        {0x35B4, 0x3C},           //BLKLEVEL    -   10 bit              -   3Ch

        {0x35B5, 0x00},           //

        {0x3904, 0x03},           //LANESEL     -   2-Lane              -   03h

        {0x3CA4, 0x80},           //TXCLKESC_FREQ - 37.125MHz           -   09(80)h 

        {0x3CA5, 0x09},           //TXCLKESC_FREQ - 37.125MHz           -   (09)80h 

        {0x3CB4, 0x2F},           //THS_PREPARE -   594mbps             -   00(2F)h

        {0x3CB5, 0x00},           //THS_PREPARE -   594mbps             -   (00)2Fh

        {0x3CB6, 0x67},           //TCLK_POST   -   594mbps             -   00(67)h

        {0x3CB7, 0x00},           //TCLK_POST   -   594mbps             -   (00)67h

        {0x3CB8, 0x2F},           //THS_TRAIL   -   594mbps             -   00(2F)h

        {0x3CB9, 0x00},           //THS_TRAIL   -   594mbps             -   (00)2Fh

        {0x3CBA, 0x4F},           //THS_ZERO    -   594mbps             -   00(4F)h

        {0x3CBB, 0x00},           //THS_ZERO    -   594mbps             -   (00)4Fh

        {0x3CBC, 0x27},           //TCLK_PREPARE-   594mbps             -   00(27)h

        {0x3CBD, 0x00},           //TCLK_PREPARE-   594mbps             -   (00)27h

        {0x3CBE, 0x27},           //TCLK_TRAIL  -   594mbps             -   00(27)h

        {0x3CBF, 0x00},           //TCLK_TRAIL  -   594mbps             -   (00)27h

        {0x3CC0, 0x27},           //TLPX        -   594mbps             -   00(27)h

        {0x3CC1, 0x00},           //TLPX        -   594mbps             -   (00)27h

        {0x3CC2, 0xB7},           //TCLK_ZERO   -   594mbps             -   00(B7)h

        {0x3CC3, 0x00},           //TCLK_ZERO   -   594mbps             -   (00)B7h

        {0x3CC4, 0x0F},           //TCLK_PRE    -   594mbps             -   00(0F)h

        {0x3CC5, 0x00},           //TCLK_PRE    -   594mbps             -   (00)0Fh

        {0x3CC6, 0x47},           //THS_EXIT    -   594mbps             -   00(47)h

        {0x3CC7, 0x00},           //THS_EXIT    -   594mbps             -   (00)47h

        {0x3436, 0x00},           //TOUT0 pin setting 0h: Low fixed




common_mass,




        /* {0x3240, 0x29},     //SHS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

        {0x3241, 0x0C},

        {0x3242, 0x00}, */




        {0x3502, 0x09},   //GAIN_RTS 9 - gain reflect at the next frame




        {IMX568_TABLE_END, 0x00}

};
  1. I can’t get any raw frames, its gives just an empty file.

Get the trace log.

modprobe rtcpu_debug

echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

v4l2-ctl --stream-mmap -c bypass_mode=0

cat /sys/kernel/debug/tracing/trace

@mehmetyusuf1414,

Thanks for the extra details.

I would suggest you try to compare the register table configuration you wrote based on the spreadsheet against this one from Framos. You might find something different that could help you get your sensor working as expected.

Also, is it possible for you to capture raw frames with v4l2-ctl and share them here?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Hello Shane,

root@OrinNX-16GB:~# cat /sys/kernel/debug/tracing/trace | grep v4l2
v4l2-ctl-6783 [000] … 351.662282: tegra_channel_open: vi-output, imx678 0-001a
v4l2-ctl-6783 [000] … 351.686801: tegra_channel_set_power: imx678 0-001a : 0x1
v4l2-ctl-6783 [000] … 351.686829: camera_common_s_power: status : 0x1
v4l2-ctl-6783 [000] … 351.687319: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-6783 [000] … 351.687334: csi_s_power: enable : 0x1
v4l2-ctl-6783 [000] … 351.687684: tegra_channel_capture_setup: vnc_id 0 W 3856 H 2180 fmt c4
v4l2-ctl-6783 [002] … 351.688338: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-6783 [002] … 351.689915: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-6783 [002] … 351.689918: csi_s_stream: enable : 0x1
v4l2-ctl-6783 [000] … 351.690392: tegra_channel_set_stream: imx678 0-001a : 0x1
v4l2-ctl-6783 [001] … 375.603135: tegra_channel_close: vi-output, imx678 0-001a
v4l2-ctl-6783 [001] … 375.631578: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-6783 [001] … 375.631580: tegra_channel_set_stream: imx678 0-001a : 0x0
v4l2-ctl-6783 [001] … 375.634487: tegra_channel_set_stream: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-6783 [001] … 375.634490: csi_s_stream: enable : 0x0
v4l2-ctl-6783 [003] … 375.636047: tegra_channel_set_power: imx678 0-001a : 0x0
v4l2-ctl-6783 [003] … 375.636066: camera_common_s_power: status : 0x0
v4l2-ctl-6783 [003] … 375.636258: tegra_channel_set_power: 13e00000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-6783 [003] … 375.636260: csi_s_power: enable : 0x0

root@OrinNX-16GB:~# dmesg | grep imx
[ 142.095533] imx678 0-001a: probing v4l2 sensor
[ 142.095648] imx678 0-001a: imx678_power_get:
[ 142.095666] imx678 0-001a: devm_clk_get failed for pllp_grtba
[ 142.096070] imx678 0-001a: tegracam sensor driver:imx678_v2.0.6
[ 142.100362] imx678_fuse_id_setup fuse id0 0, fuse id1 0
[ 142.100785] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx678 0-001a bound
[ 142.102407] imx678 0-001a: Detected IMX678 sensor
[ 142.114637] imx568 0-0037: probing v4l2 sensor
[ 142.114761] imx568 0-0037: devm_clk_get failed for pllp_grtba
[ 142.114865] imx568 0-0037: tegracam sensor driver:imx568_v2.0.6
[ 142.122148] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx568 0-0037 bound
[ 142.122758] imx568 0-0037: Detected IMX568 sensor
[ 142.122975] imx568 2-0036: probing v4l2 sensor
[ 142.123077] imx568 2-0036: devm_clk_get failed for pllp_grtba
[ 142.123167] imx568 2-0036: tegracam sensor driver:imx568_v2.0.6
[ 142.124834] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx568 2-0036 bound
[ 142.131156] imx568 2-0036: Detected IMX568 sensor
[ 254.893257] imx678_set_mode, mode = 0
[ 256.465226] imx678_start_streaming, without errors
[ 351.690416] imx678_set_mode, mode = 0
[ 353.261087] imx678_start_streaming, without errors
root@OrinNX-16GB:~#

It seems like CAM1-2 did not start streaming at all. Those FPS values must be IMX678’s.

Hello Andrew,

I am currently unable to get even raw frames from CAM1-2. I will let you know if I find something else, thank you.

Hello @mehmetyusuf1414,

Interesting.

So you have 2 cameras connected and they are 2 different modules right ? One is the 568 and the other one is the 678, correct ?

Can you try the v4l2-ctl capture command but setting different video devices with -d /dev/videoX?

best regards,
Andrew
Embedded Software Engineer at ProventusNova

Hey guys, I found what the problem was.

I was following the “Image Data Output Format on each Readout mode” section of the datasheet and there it says that the ADBIT should be set to 0 for AD = 10–bit. Thats why I set it to 0h.

But in the register map it says this:

So yes, ADBIT is 0 but 0x3200 register’s first and third bits are fixed to 1. There this makes the correct value 05h. Changing this solved my issue.

Thank you for your help.