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.

TDA4VH-Q1: CSI Instance Selection

Part Number: TDA4VH-Q1

Tool/software:

Hello Colleagues,

We are using maxim ser/des and we were wondering about the CSI instance selection and how does it handled in the low level. 

It seems like we were using default CSI instance, I presume it is CSI0, but we couldn't manage to get anything from CSI1 and CSI2. 

Is there any specific piece of code that does this selection? I have found something like get inst id but it seem this is not what we are looking for, see below.

It is also important to note that, the ser/des and imager configurations handled correctly through I2C but image is not received. 

  • Hi,

    CSIRX instance id is configurable parameter in both CSIRX OpenVX node and CSIRX PDK driver. For the node, below high lighted parameter can be used to specify instance id. 

    typedef struct
    {
    tivx_capture_inst_params_t instCfg[TIVX_CAPTURE_MAX_INST]; /*!< CSI2Rx Instance configuration */
    uint32_t instId[TIVX_CAPTURE_MAX_INST]; /*!< CSI2Rx Instance Id, 0:CSIRx0 1:CSIRx0 */
    uint32_t numInst; /*!< Number of instances in current capture node */
    uint32_t numCh; /*!< Number of channels to be processed on current instance of Node */
    uint32_t chVcNum[TIVX_CAPTURE_MAX_CH]; /*!< Virtual Channel Number for each channel */
    uint32_t chInstMap[TIVX_CAPTURE_MAX_CH]; /*!< Instance ID for each channel */
    uint32_t timeout; /*!< Total timeout (in ms) for all cameras. If this timeout is exceeded, cameras that have not been received are dead.
    The timeout value will only be considered if calling the \ref tivxCaptureRegisterErrorFrame API to enable error detection */
    uint32_t timeoutInitial; /*!< Initial failure timeout (in ms) for first time the capture node fails. Once this
    timeout has been exceeded, the "timeout" parameter will then be used.
    The timeout value will only be considered if calling the \ref tivxCaptureRegisterErrorFrame
    API to enable error detection */
    } tivx_capture_params_t;

    Regards,

    Brijesh

  • Hi Brijesh,

    Thanks for the quick reply.

    CSIRX OpenVX node

    Do you mean CaptureNode Configs, as seen below code snip?

    capture_config.instId[id] = id;
    obj->capture_node = tivxCaptureNode(obj->graph, capture_config, obj->cap_frames[0]);
    Where is the Exact location for CSIRX PDK driver?
    Thanks in advance.
    Berke
  • Hi Berke,

    Yes, using this parameter, you could change the CSIRX instance id. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Yes, using this parameter, you could change the CSIRX instance id. 

    1. I used 1 and 2 values for the instance id but I got Capture Node Error: Wrong instance! .

    2. Also can you please support on the second question, see below?

    Where is the Exact location for CSIRX PDK driver?

    Thanks,

    Berke

  • Hi Berke,

    Have you also changed channel to instance mapping table? Its a part of same structure. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Could you please share the parameter name for that and how to modify it, so I could update it as well?

    Thanks,

    Berke

  • Hi Berke,

    uint32_t chInstMap[TIVX_CAPTURE_MAX_CH]; 

    Regards,

    Brijesh

  • Hi Brijesh,

    When I modify the chInstMap in accordance with the instId, the pipeline worked. Thanks a lot. 


    local_capture_config.instId[0] = 1; printf("\n\nInstance ID: %d \n\n", local_capture_config.instId[3]); local_capture_config.chInstMap[0] = 1; local_capture_config.chVcNum[0] = obj->selectedCam%NUM_CAPT_CHANNELS;

    Just to understand better, what is the purpose of this mapping parameter?
    It is obvious that instId is the selection of csi instance but what do we need mapping for? 

    Thanks,
    Berke
  • Hi Berke,

    Glad to know it is working fine.

    Essentially each node can support multiple CSIRX instances, but the virtual channel id could be common across instances.. So nodes provides an interface to specify this information. For example, two instances capturing one channel on each instance, having same virtual channel id as 0. In this case, number of instances are two, number of channels are two, instId are 0 and 1, chInstMap[0] = 0, ie channel 0 is on instance 0 and chInstMap[1] = 1 ie channel1 is coming from instance 1 and then chVcNum for both the channels could be 0. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Thanks for the details.

    Berke