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.

how to debug when I develop an new camera driver?

Other Parts Discussed in Thread: SK-TDA4VM

hi,

I am developing an new camera driver based on single_cam demo .I am using a SK-TDA4VM board.So I have modified the I2c form I2c6 to I2c3 and the MIPI interface output some signals.

but when I run demo, it stuck after start capture node. My formt is set as UYVY. 

How can I debug it next? 

expect your reply

happy new year

  • Hi Li,

    Are you using capture node, running on R5F? How do you configure sensor and SERDES? Are you using imaging component to configure sensor & SERDES? 

    Also is the virtual channel, output data format and number of lanes, lane speed etc configuration matching with the sensor output ? Could you please check them? 

    Please also make sure to start streaming from sensor/Deserializer only in the stream on callback.

    Regards,

    Brijesh

  • yes. I  am using app_single_cam demo.

    my deserial is connect to tda4's CSI1.Its output format is YUV422 UYVY. I aslo enable streamingOn in R5F's streamingON functuion.

    I have check the input of CSI interface. it is OK.

    also,I run "devmem2 0x04514048"

    /dev/mem opened.
    Memory mapped at address 0xffffa0b00000.
    Read at address 0x04514048 (0xffffa0b04048): 0x00333300

     my configuration  under imaging component like below:

     
    static IssSensor_CreateParams ahd1080pCreatePrms = {
    SENSOR_AHD_1080P, /*sensor name*/
    0x03, /*i2cInstId*/
    {
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00
    },/*i2cAddrSensor*/
    {
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00
    },/*i2cAddrSer*/
    /*IssSensor_Info*/
    {
    {
    AHD1080P_OUT_WIDTH, /*width*/
    AHD1080P_OUT_HEIGHT-AHD1080P_META_HEIGHT_AFTER, /*height*/
    1, /*num_exposures*/
    vx_false_e, /*line_interleaved*/
    {
    {VX_DF_IMAGE_UYVY, 7}, /*dataFormat and MSB [0]*/
    },
    0, /*meta_height_before*/
    AHD1080P_META_HEIGHT_AFTER, /*meta_height_after*/
    },
    0, /*features*/
    ALGORITHMS_ISS_AEWB_MODE_AEWB, /*aewbMode*/
    25, /*fps*/
    4, /*numDataLanes*/
    {1, 2, 3, 4}, /*dataLanesMap*/
    {0, 0, 0, 0}, /*dataLanesPolarity*/
    CSIRX_LANE_BAND_SPEED_1350_TO_1500_MBPS, /*csi_laneBandSpeed*/
    },
    8, /*numChan*/
    390, /*dccId*/
    };
  • my deserial works on 4 datalane ,1.5Gbps.

  • Hi,

    In the API, app_create_graph, can you please make below changes and try it again?

    local_capture_config.numInst = 1U;/* Configure both instances */
    local_capture_config.numCh = 1U;/* Single cam. Only 1 channel enabled */


    {
    vx_uint8 ch, id, lane, q;
    for(id = 0; id < local_capture_config.numInst; id++)
    {
    local_capture_config.instId[id] = 0;
    local_capture_config.instCfg[id].enableCsiv2p0Support = (uint32_t)vx_true_e;
    local_capture_config.instCfg[id].numDataLanes = sensorParams.sensorInfo.numDataLanes;
    local_capture_config.instCfg[id].laneBandSpeed = sensorParams.sensorInfo.csi_laneBandSpeed;

    for (lane = 0; lane < local_capture_config.instCfg[id].numDataLanes; lane++)
    {
    local_capture_config.instCfg[id].dataLanesMap[lane] = lane + 1;
    }


    for (q = 0; q < NUM_CAPT_CHANNELS; q++)
    {
    ch = (NUM_CAPT_CHANNELS-1)* id + q;
    local_capture_config.chVcNum[ch] = q;
    local_capture_config.chInstMap[ch] = id;
    }
    }
    }

    local_capture_config.chInstMap[0] = 0;
    local_capture_config.chVcNum[0] = 0;

    Regards,

    Brijesh

  • I tried it . no display yet.I find there is a warning!

    [MCU2_0]     77.350900 s:  VX_ZONE_ERROR:[tivxCaptureProcess:974]  tivxCaptureProcess !!!
    [MCU2_0]     77.350956 s:  VX_ZONE_ERROR:[tivxCaptureProcess:1070]  CAPTURE NOT Steady state !!!
    [MCU2_0]     77.351076 s:  VX_ZONE_ERROR:[tivxCaptureProcess:974]  tivxCaptureProcess !!!
    [MCU2_0]     77.351129 s:  VX_ZONE_ERROR:[tivxCaptureProcess:1070]  CAPTURE NOT Steady state !!!
    [MCU2_0]     77.351239 s:  VX_ZONE_ERROR:[tivxCaptureProcess:974]  tivxCaptureProcess !!!
    [MCU2_0]     77.351288 s:  VX_ZONE_ERROR:[tivxCaptureProcess:998]  CAPTURE Steady state !!!
    [MCU2_0]     77.351387 s:  VX_ZONE_ERROR:[tivxCaptureProcess:1012]  tivxCaptureStart !!!
    [MCU2_0]     77.351443 s:  VX_ZONE_WARNING:[tivxCaptureSetTimeout:772]  CAPTURE: WARNING: Error frame not provided using tivxCaptureRegisterErrorFrame, defaulting to

    also,I print performance statistics. mcu2_0 and mcu2_1's TOTAL LOAD looks unnormal.

    Summary of CPU load,
    ====================

    CPU: mpu1_0: TOTAL LOAD =   0.35 % ( HWI =   0. 2 %, SWI =   0. 2 % )
    CPU: mcu2_0: TOTAL LOAD = 42932399.96 % ( HWI =   0. 0 %, SWI =   0. 0 % )
    CPU: mcu2_1: TOTAL LOAD = 42925316.96 % ( HWI =   0. 0 %, SWI =   0. 0 % )
    CPU:  c6x_1: TOTAL LOAD =   0. 5 % ( HWI =   0. 2 %, SWI =   0. 1 % )
    CPU:  c6x_2: TOTAL LOAD =   0. 5 % ( HWI =   0. 2 %, SWI =   0. 1 % )
    CPU:  c7x_1: TOTAL LOAD =   0. 7 % ( HWI =   0. 3 %, SWI =   0. 2 % )


    HWA performance statistics,
    ===========================



    DDR performance statistics,
    ===========================

    DDR: READ  BW: AVG =      0 MB/s, PEAK =      0 MB/s
    DDR: WRITE BW: AVG =      0 MB/s, PEAK =      0 MB/s
    DDR: TOTAL BW: AVG =      0 MB/s, PEAK =      0 MB/s


    Detailed CPU performance/memory statistics,
    ===========================================

    CPU: mcu2_0: TASK:           IPC_RX:   0. 0 %
    CPU: mcu2_0: TASK:       REMOTE_SRV:  24. 1 %
    CPU: mcu2_0: TASK:        LOAD_TEST:   0. 0 %
    CPU: mcu2_0: TASK:         TIVX_CPU:   0. 0 %
    CPU: mcu2_0: TASK:          TIVX_NF:   0. 0 %
    CPU: mcu2_0: TASK:        TIVX_LDC1:   0. 0 %
    CPU: mcu2_0: TASK:        TIVX_MSC1:   0. 0 %
    CPU: mcu2_0: TASK:        TIVX_MSC2:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_VISS1:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_CAPT1:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_CAPT2:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_DISP1:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_DISP2:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_CSITX:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_CAPT3:   0. 0 %
    CPU: mcu2_0: TASK:       TIVX_CAPT4:   0. 0 %

    CPU: mcu2_0: HEAP:   DDR_SHARED_MEM: size =   16777216 B, free =   16706560 B ( 99 % unused)
    CPU: mcu2_0: HEAP:           L3_MEM: size =     262144 B, free =     261888 B ( 99 % unused)
    CPU: mcu2_0: HEAP:  DDR_NON_CACHE_M: size =   16777216 B, free =   16776960 B ( 99 % unused)

    CPU: mcu2_1: TASK:           IPC_RX:   0. 0 %
    CPU: mcu2_1: TASK:       REMOTE_SRV:  11.95 %
    CPU: mcu2_1: TASK:        LOAD_TEST:   0. 0 %
    CPU: mcu2_1: TASK:         TIVX_SDE:   0. 0 %
    CPU: mcu2_1: TASK:         TIVX_DOF:   0. 0 %
    CPU: mcu2_1: TASK:      IPC_TEST_RX:   0. 0 %
    CPU: mcu2_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU: mcu2_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU: mcu2_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU: mcu2_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU: mcu2_1: TASK:      IPC_TEST_TX:   0. 0 %

    CPU: mcu2_1: HEAP:   DDR_SHARED_MEM: size =   16777216 B, free =   16773376 B ( 99 % unused)
    CPU: mcu2_1: HEAP:           L3_MEM: size =     262144 B, free =     262144 B (100 % unused)
    CPU: mcu2_1: HEAP:  DDR_NON_CACHE_M: size =  117440512 B, free =  117440256 B ( 26 % unused)

    CPU:  c6x_1: TASK:           IPC_RX:   0. 0 %
    CPU:  c6x_1: TASK:       REMOTE_SRV:   0. 0 %
    CPU:  c6x_1: TASK:        LOAD_TEST:   0. 0 %
    CPU:  c6x_1: TASK:         TIVX_CPU:   0. 0 %
    CPU:  c6x_1: TASK:      IPC_TEST_RX:   0. 0 %
    CPU:  c6x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_1: TASK:      IPC_TEST_TX:   0. 0 %

    CPU:  c6x_1: HEAP:   DDR_SHARED_MEM: size =   16777216 B, free =   16774912 B ( 99 % unused)
    CPU:  c6x_1: HEAP:           L2_MEM: size =     229376 B, free =     229376 B (100 % unused)
    CPU:  c6x_1: HEAP:  DDR_SCRATCH_MEM: size =   50331648 B, free =   50331648 B ( 14 % unused)

    CPU:  c6x_2: TASK:           IPC_RX:   0. 0 %
    CPU:  c6x_2: TASK:       REMOTE_SRV:   0. 0 %
    CPU:  c6x_2: TASK:        LOAD_TEST:   0. 0 %
    CPU:  c6x_2: TASK:         TIVX_CPU:   0. 0 %
    CPU:  c6x_2: TASK:      IPC_TEST_RX:   0. 0 %
    CPU:  c6x_2: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_2: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_2: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_2: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c6x_2: TASK:      IPC_TEST_TX:   0. 0 %

    CPU:  c6x_2: HEAP:   DDR_SHARED_MEM: size =   16777216 B, free =   16774912 B ( 99 % unused)
    CPU:  c6x_2: HEAP:           L2_MEM: size =     229376 B, free =     229376 B (100 % unused)
    CPU:  c6x_2: HEAP:  DDR_SCRATCH_MEM: size =   50331648 B, free =   50331648 B ( 14 % unused)

    CPU:  c7x_1: TASK:           IPC_RX:   0. 0 %
    CPU:  c7x_1: TASK:       REMOTE_SRV:   0. 0 %
    CPU:  c7x_1: TASK:        LOAD_TEST:   0. 0 %
    CPU:  c7x_1: TASK:         TIVX_CPU:   0. 0 %
    CPU:  c7x_1: TASK:      IPC_TEST_RX:   0. 0 %
    CPU:  c7x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c7x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c7x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c7x_1: TASK:      IPC_TEST_TX:   0. 0 %
    CPU:  c7x_1: TASK:      IPC_TEST_TX:   0. 0 %

    CPU:  c7x_1: HEAP:   DDR_SHARED_MEM: size =  268435456 B, free =  268435456 B (  4 % unused)
    CPU:  c7x_1: HEAP:           L3_MEM: size =    8159232 B, free =    8159232 B (100 % unused)
    CPU:  c7x_1: HEAP:           L2_MEM: size =     458752 B, free =     458752 B (100 % unused)
    CPU:  c7x_1: HEAP:           L1_MEM: size =      16384 B, free =      16384 B (100 % unused)
    CPU:  c7x_1: HEAP:  DDR_SCRATCH_MEM: size =  268435456 B, free =  268435456 B (  4 % unused)


    GRAPH:         graph_84 (#nodes =   4, #executions =      0)
     NODE:   CAPTURE2:                  node_95: avg =      0 usecs, min/max = 18446744073709551 /      0 usecs, #executions =          0
     NODE:  VPAC_LDC1:                 node_100: avg =      0 usecs, min/max = 18446744073709551 /      0 usecs, #executions =          0
     NODE:  VPAC_MSC1:                 node_102: avg =      0 usecs, min/max = 18446744073709551 /      0 usecs, #executions =          0
     NODE:   DISPLAY1:                 node_104: avg =      0 usecs, min/max = 18446744073709551 /      0 usecs, #executions =          0

     PERF:            TOTAL: avg =      0 usecs, min/max = 4294967295 /      0 usecs, #executions =          0

     PERF:            TOTAL:    0. 0 FPS

  • [MCU2_0]     77.351443 s:  VX_ZONE_WARNING:[tivxCaptureSetTimeout:772]  CAPTURE: WARNING: Error frame not provided using tivxCaptureRegisterErrorFrame, defaulting to

    Please ignore this warning for the time being. This just tells that there is no error frame provided.

    I made a mistake in my last post. I think you are using CSI instance 1, so can you please replace 0 with 1 in below statements?

    local_capture_config.instId[id] = 0;

    local_capture_config.chInstMap[0] = 0;
    local_capture_config.chVcNum[0] = 0;

    Regards,

    Brijesh

  • OK
    also,local_capture_config.numInst set to be 1 or 2?
  • You could keep it one, since you are just using single instance. 

  • thanks.

    I tried it again and no good turn.

    I run devmem2 0x04514048 to check register .it is 0x00333306.

    performance statistics:

    CPU: mpu1_0: TOTAL LOAD = 0.31 % ( HWI = 0. 0 %, SWI = 0. 0 % )
    CPU: mcu2_0: TOTAL LOAD = 0. 0 % ( HWI = 0. 0 %, SWI = 0. 0 % )
    CPU: mcu2_1: TOTAL LOAD = 0. 0 % ( HWI = 0. 0 %, SWI = 0. 0 % )
    CPU: c6x_1: TOTAL LOAD = 0. 5 % ( HWI = 0. 2 %, SWI = 0. 1 % )
    CPU: c6x_2: TOTAL LOAD = 0. 5 % ( HWI = 0. 2 %, SWI = 0. 1 % )
    CPU: c7x_1: TOTAL LOAD = 0. 7 % ( HWI = 0. 3 %, SWI = 0. 2 % )

    I aslo press 's' to save Sensor RAW data .and open it using 7yuv software with YUV422 UYVU format. it looks like wrong data.

    so how can I debug next?

  • is there something else that I need to check?

  • Hi Li,

    Can you please read register value at the offset 0x04514048 and check if it is changing? 

    Also can you please check in the sensor or deserializer that the CSI data format is set to UYVY ie 0x18?

    Because if the data type and virtual channel are not matching, CSIRX will not capture frames..

    Regards,

    Brijesh

  • nice to your reply.I check it again.register value at the offset 0x04514048 change between 0x00333306 and 0x00222206. and CSI data format is set to YUV422  UYVY 8bit.what do you mean 0x18?

    I aslo check register value at 0x04514104,it is 0x80000111. it is different with others that is 0x80000113.

  • In the CSI protocol, the output stream is tagged with the data type that it contains. It will be part of the CSI packet header. We need to make sure that output packed header has value 0x18, which is data type value of the YUV422 format. 

    Since the value at 0x04514048 is changing, it means that lanes are detecting some activities. 

    I aslo check register value at 0x04514104,it is 0x80000111. it is different with others that is 0x80000113.

    I think stream is enabled, but it is waiting for the data. Could you please check why transmitter is not transmitting data? 

    Regards,

    Brijesh

  • my deserializer data sheet say that "Data Type" is 0x1E  which means YUV422 8-bit. 

  • oh sorry, yes, data type must be set to 0x1E. 

    Can you pleas make sure to stop streaming before streamon callback and start it only in streamon callback? 

    Also is the output lane speed from the deserializer/sensor matching with what is configured in CSIRX? 

    Regards,

    Brijesh

  • are you sure that YUV422 format data type is 0x18 in the MIPI?

    I find it on the Internet :

    Data Type Description
    0x18 YUV420 8-bit
    0x19 YUV420 10-bit
    0x1A Legacy YUV420 8-bit
    0x1B Reserved
    0x1C YUV420 8-bit (Chroma Shifted Pixel Sampling)
    0x1D YUV420 10-bit (Chroma Shifted Pixel Sampling)
    0x1E YUV422 8-bit
    0x1F YUV422 10-bit

    expect your confirm

  • so, anything else need to be checked?

  • 1. yes,I start streaming  only in streamon callback.

    2. lane speed is CSIRX_LANE_BAND_SPEED_1350_TO_1500_MBPS.and capture node also use this value.

     
  • Can you check error status registers and see if CSIRX is reporting any error?

    Regards,

    Brijesh

  • could you tell me which register i need to check?thaks

  • I checked some registers' value.

    0x04514104=0x80000111

    0x04514008 = 0x43210410

    0x04514108 = 0x00000000

    0x04504048 = 0x00333306 /0x00222206

    0451 4028h = 0x00000000

    0x0451404C = 0x00000000

    0x04514050 = 0x00000000

    0x0451 402C = 0x000F03B1

    I am not sure it is enough to find my problem.

     

  • hi

    I find it is struck in here.

    status = tivxEventWait(prms->frame_available, (uint32_t)prms->timeoutRemaining);

    does it means tda4 did not receive a frame?

    However the value at the register 0x04504048 is 0x00333306 or 0x00222206 ,and always be changing.

    expect your reply

  • this is my configuration of capture node. I print it .please help check it. I am using CSI1 and my deserializer's visual chanel is 0.

    local_capture_config------------
    numInst:1
    numInst:1
    instId[0]:1
    instId[1]:1
    chVcNum[0]:1 chInstMap[0]:1
    chVcNum[1]:1 chInstMap[1]:0
    chVcNum[2]:2 chInstMap[2]:0
    chVcNum[3]:3 chInstMap[3]:0
    local_capture_config--instCfg------------
    numDataLanes:4
    laneBandSpeed:19
    numPixels:0
    enableCsiv2p0Support:1
    dataLanesMap[0-3]:1,2,3,4
    capture_config = 0x0xedaeb0
    Creating capture node

  • in addition,numCh:1

  • Hi Li,

    Could you please share values of the below registers?

    CSI_RX_IF_SHIM_DMACNTX (04500020h)
    CSI_RX_IF_VBUS2APB_STATIC_CFG (04504008h)
    CSI_RX_IF_VBUS2APB_MONITOR_IRQS (04504018h)
    CSI_RX_IF_VBUS2APB_INFO_IRQS (04504020h)
    CSI_RX_IF_VBUS2APB_ERROR_IRQS (04504028h)
    CSI_RX_IF_VBUS2APB_DPHY_LANE_CONTROL (04504040h)
    CSI_RX_IF_VBUS2APB_DPHY_STATUS (04504048h)
    CSI_RX_IF_VBUS2APB_DPHY_ERR_STATUS_IRQ (0450404Ch)
    SI_RX_IF_VBUS2APB_INTEGRATION_DEBUG (04504060h)
    CSI_RX_IF_VBUS2APB_ERROR_DEBUG (04504074h)
    CSI_RX_IF_VBUS2APB_STREAM0_CTRL (04504100h)
    CSI_RX_IF_VBUS2APB_STREAM0_STATUS (04504104h)
    DPHY_RX_VBUS2APB_CMN0_CMN_DIG_TBIT36 (045800A8h)
    DPHY_RX_VBUS2APB_PCS_TX_DIG_TBIT0 (04580B00h)
    DPHY_RX_VBUS2APB_CMN0_CMN_DIG_TBIT2 (04580020h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT33 (04580290h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT34 (04580294h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT42 (045802B4h)
    DPHY_RX_VBUS2APB_CMN0_CMN_DIG_TBIT58 (045800F8h)


    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT37 (045802A0h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT38 (045802A4h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT39 (045802A8h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT40 (045802ACh)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT41 (045802B0h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT43 (045802B8h)
    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT44 (045802BCh)

    If you are using CSI Instance-1, please share similar registers for instance-1.

    Regards,

    Brijesh

  • hi,

    I check these register of CSIINSTANCE 1.

    help me check it ,please

    CSI_RX_IF_SHIM_DMACNTX (04510020h) 0x8C00005E CSI_RX_IF_VBUS2APB_STATIC_CFG (04514008h)0x43210410 CSI_RX_IF_VBUS2APB_MONITOR_IRQS (04514018h)0x00000000 CSI_RX_IF_VBUS2APB_INFO_IRQS (04514020h)0x00000000 CSI_RX_IF_VBUS2APB_ERROR_IRQS (04514028h)0x00000000 CSI_RX_IF_VBUS2APB_DPHY_LANE_CONTROL (04514040h)0x0001F01F CSI_RX_IF_VBUS2APB_DPHY_STATUS (04514048h)0x00333306 0x00222206 CSI_RX_IF_VBUS2APB_DPHY_ERR_STATUS_IRQ (0451404Ch)0x00000000 SI_RX_IF_VBUS2APB_INTEGRATION_DEBUG (04514060h)0x10000000 CSI_RX_IF_VBUS2APB_ERROR_DEBUG (04514074h)0x00000000 CSI_RX_IF_VBUS2APB_STREAM0_CTRL (04514100h)0x00000001 CSI_RX_IF_VBUS2APB_STREAM0_STATUS (04514104h)0x80000111 DPHY_RX_VBUS2APB_CMN0_CMN_DIG_TBIT36 (045900A8h)0x00000EE8 DPHY_RX_VBUS2APB_PCS_TX_DIG_TBIT0 (04590B00h)0x00000273 DPHY_RX_VBUS2APB_CMN0_CMN_DIG_TBIT2 (04590020h)0x00000429 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT33 (04590290h)0x00028000 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT34 (04590294h)0x00047C00 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT42 (045902B4h)0x00400800 DPHY_RX_VBUS2APB_CMN0_CMN_DIG_TBIT58 (045900F8h)0x00000023

    DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT37 (045902A0h)0xBC3CF3E7 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT38 (045902A4h)0x00101409 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT39 (045802A8h)0x0104000D DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT40 (045802ACh)0x00102C15 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT41 (045802B0h)0x000A0019 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT43 (045802B8h)0x00010020 DPHY_RX_VBUS2APB_DL0_RX_DIG_TBIT44 (045802BCh)0x000058A0

  • Hi dw li,

    Looking at the register dump, it looks like CSIRX is just waiting for the next packet to arrive in. But since there is not packet arrived, it is not capturing anything. Are you sure that the sensor/deserializer is started transmission? 

    Also it looks like you are using virtual channel=1 with YUV422 data type. Please see if this is what you are transmitting from sensor/deserializer.

    There are no other errors reported in the CSIRX registers.

    Regards,

    Brijesh

  • yes.I tried both virtual channel 1 and channel 0.It looks like same.

    a question:

    the value at the register 0x04504048 is 0x00333306 or 0x00222206 ,and always be changing。whether It indicate that there are some data on the CSI1?but you said it seems "not packet arrived" .

    what happened?

  • Hi,

    This register just indicates the state of the ULP. This does not tell if the packet has arrived or not.. 

    Between, are you using CSI instance 0 or CSI instance1? This register is for CSI Instance0. For CSI Instance1, register offset is 0x04514048.

    Regards,

    Brijesh

  • sorry .I am using CSI1 . the value at the register 0x04514048 is 0x00333306 or 0x00222206 ,and always be changing .

    what may be the reason for no packet ?

    I am sure that I enable streaming On in the streamingOn callback.

    I am using SK-TDA4VM board. is it different with TDA4evm that a bigger board when I run single_cam demo?

    Regards,

    li

  • I just make a test.when I change {VX_DF_IMAGE_UYVY, 7} to{TIVX_RAW_IMAGE_16_BIT, 11}. the capture node process fucntion run and not struck. print messages like below:
    [MCU2_0]    693.299607 s:  VX_ZONE_ERROR:[tivxCaptureProcess:1033]  is_all_ch_frame_available=1
    [MCU2_0]    693.299652 s:  VX_ZONE_ERROR:[tivxCaptureProcess:1051]  while-----end
    [MCU2_0]    693.299801 s:  VX_ZONE_ERROR:[tivxCaptureProcess:966]  entering tivxCaptureProcess !!!
    [MCU2_0]    693.299853 s:  VX_ZONE_ERROR:[tivxCaptureProcess:998]  CAPTURE Steady state !!!
    [MCU2_0]    693.299903 s:  VX_ZONE_ERROR:[tivxCaptureProcess:1012]  tivxCaptureStart !!!
    [MCU2_0]    693.299952 s:  VX_ZONE_ERROR:[tivxCaptureProcess:1033]  is_all_ch_frame_available=0
    [MCU2_0]    693.300002 s:  VX_ZONE_ERROR:[tivxCaptureTimeout:283]  tivxCaptureTimeout----timeoutRemaining=21
    [MCU2_0]    693.304484 s: lidw:appRemoteServiceRunHandler[com.ti.viss_server],cmd=1

    but my sensor data format is YUV422 8bit. could you help me to understand it?

  • Hi dw li,

    This means the output stream is not tagged with the YUV422 data format, ie value 0x1E. But it is tagged with RAW12 data format, ie value 0x2C. As i said earlier, the header in the CSI output packet contains value to identify the data format that it is transmitting. If this is not matching, then CSIRX will not capture frames.. 

    Please check sensor, deserializer setting to correct data format..

    Regards,

    Brijesh

  • I am using SK-TDA4VM board. is it different with TDA4evm that a bigger board when I run single_cam demo?

    On the SK board, what is the deserializer that you are using? Can you please share the deserializer settings? 

    Regards,

    Brijesh

  • I am using a chip which can receive anolog video singal ,and output YUV422 8BIT data by 4 lanes MIPI interface.I connect it to the csi1 of 40 pin high speed camera interface of the SK-TDA4VM board. 

    I have write registers of the deserializer and  configure it as 4 lanes,yuv422 8bit .

  • how can I capture the raw data to check the data format?

  • how can I check the recieved data format in the demo code or csi driver code?

  • I have write registers of the deserializer and  configure it as 4 lanes,yuv422 8bit .

    In addition to data itself, the id of the data format also maters. You need to set the id of the data format correctly in the out going stream..

    how can I capture the raw data to check the data format?

    didnot get it. You were able to capture something in when you set output data format as raw12. isn't it?

    how can I check the recieved data format in the demo code or csi driver code?

    You could save output image and view it offline.

    Regards,

    Brijesh

  • do you mean that pressing "s" to save image?  It is from obj->cap_frames[0] .

    are you sure that if capture node process function is stuck , the data in obj->cap_frames[0] update?

  • 1. I see that capture node is created with TIVX_TARGET_CAPTURE2. why not TIVX_TARGET_CAPTURE1?

    2. what is the role of instCfg->numPixels ? is it  OK to set as 0?

  • when I set as RAW12, capture node process update even if no data is  on the csi1 interface.  Why?I have not enable stream On. What is Capture node detected?  

  • do you mean that pressing "s" to save image?  It is from obj->cap_frames[0] .

    Yes

    are you sure that if capture node process function is stuck , the data in obj->cap_frames[0] update?

    No, you need to do it when capture is successful in raw12 mode.

    1. I see that capture node is created with TIVX_TARGET_CAPTURE2. why not TIVX_TARGET_CAPTURE1?

    It is ok to use capture2..

    2. what is the role of instCfg->numPixels ? is it  OK to set as 0?

    Yes, it is ok.

    when I set as RAW12, capture node process update even if no data is  on the csi1 interface.  Why?I have not enable stream On. What is Capture node detected?  

    But, in case of yuv mode, no capture? Try uncommenting _APP_DEBUG_ macro.

  • When set as yuv,capture node process not update. Then I press s , *.yuv file can be saved.  But I thinking that these .yuv file are useless for analysising the csi data.

    When set as raw12, even if STREAM OFF, capture node process will update. Then I press s ,.raw file saved. I also think that these .raw  file are useless for analysising csi data.because no data input.

      

    I think  there may be some bugs when set as raw12. 

  • I think that's happening because single camera example is providing test frame to the capture node, which will be used if there are not frames from the sensor.

    please comment out call to tivxCaptureRegisterErrorFrame API in ti-processor-sdk-rtos-j721e-evm-08_00_00_12\vision_apps\apps\basic_demos\app_single_cam\app_single_cam_main.c file. Then you will not find it running if there is no streamon call..

    Regards,

    Brijesh 

  • yes. you are right. when I comment out call to tivxCaptureRegisterErrorFrame API,and set as RAW16, capture node process not update.

    now, the problem is that how can I check the data format is not UYVY ? capture node process is stuck.

    Regards

    li

  • CSIRX does not have a way to reported incoming data format. The only method is, we configure data format, which is matching with the incoming stream, then it would capture.. So please set the same data format as set in the deserializer.

    Could you also please help me understand your data flow? What is sensor you are using? Which SERDES combination? If possible, please share your SERDES settings. 

    Regards,

    Brijesh

  • I am using a Analog video decoding chip which recieve analog video input,and output YUV422 8bit.

    I configure it by writing the register table into chip using I2c.

  • But how do connect analog chip to CSIRX? Is there a SERDES in between? or its direct connection?

    How do you control the output in this chip? When do you start/stop the encoder output? 

    Regards,

    Brijesh

  • the chip recieve analog video ,and convert it ,then output by mipi interface.

    I control it by writing registers.

    first,I write init_cfg_register_table in the callback POWERON.

    then, I write enableStreaming_register table in the callback STREAMON.

    Regards

    li

  • Hi li,

    Can you try setting all configuration in streamon only?

    Regards,

    Brijesh

  • I have try it.