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.

TDA4VM: Use CSITX to Send the 5th Channel of the Capture Node

Part Number: TDA4VM

Hello,

We now have a requirement to forward the 5th Channel of the Capture Node data with CSITX node provided by TDA4. 

At the moment, we are capable of forwarding the 1st channel data of the capture node, by simply connecting the output of the capture node to the input of csitx node in the graph(both of type vx_object_array). And make sure the enabled channel number for csitx is 1.

However, the situation became trickier when we want to forward the 5th channel data of the capture node. We tried to obtain the 5th channel with vxGetObjectArrayItem, created a new array with it and give it as the input of csitx. It turns out the graph is not connect the way we expected. 

Any recommend way to achieve this? Thank you in advance.

Regards,

Sijie Zhu

  • Hi Sijie Zhu,

    In this case, CSITX node requires few changes. You could use same original code by connecting CSIRX to CSITX and increase the number of channels to 5, but In the CSITX node, instead of sending out 1st channels frame out of CSITX, you need to extract 5th channels frame.. This is possible, just requires changes in the CSITX node.. Like in the createArgs, we can add extra parameters to indicate CSITX node to operate in single channels mode, even if it gets object array with multiple items, and then also add one more parameter to take active channel from the input object array.. Once these items are taken care, then CSITX node can support what you are looking for..

    Regards,

    Brijesh

  • Hello Brijesh,

    Thanks for the quick response. 

    Making the CSIRX working in the single channel mode does not work for us, since we need 5 channels input for the autonomous driving APPs whilst only the 5th channel (front view) is required to be transmitted to another ECU. 

    Since you said the modification of the csitx kernel is inevitable, the way I am thinking of is to offset startChIdx and endChidx, while keeping the enabled channel for csitx as 1. 

    As shown in the screenshot, I offset the startChIdx and endChidx by 3 in order to transmit the 4th channel (Max supported channel for CSITX is 4 at the moment). However, this function "tuvxCsitxEnqueueFrameToDriver" stalled after 1 cycle of execution. Do you probably know why? And what do you think of my way?

    Kind Regards,

    Sijie Zhu

  • Hi Sijie Zhu,

    I meant the changes are required in the CSITX, not in CSIRX.  

    Can you please check if you have changed below statement?

    /* Set number of channels to number of items in input object array */
    prms->numCh = (uint8_t)input_desc->num_items;

    /* Setting CSITX transmit parameters */
    if ((vx_status)VX_SUCCESS == status)
    {
    tivxGetObjDescList(input_desc->obj_desc_id, (tivx_obj_desc_t **)prms->img_obj_desc,
    prms->numCh);

    tivxCsitxSetCreateParams(prms, configuration_desc);
    }

    Regards,

    Brijesh

  • Hello Brijesh,

    I read through tiovx/kernels_j7/hwa/csitx/vx_csitx_target.c, and I am afraid to implement a "single channels mode" would require a massive change, bacause prms->numCh is used everywhere in the source file. prms->numCh=5 means the buffer reserved by pdk for the csitx node is 5 times more than what is actually needed. This might also cause the program stall. 

    I am not sure if I understand you correctly. Please correct me if I did not. Thanks a lot.

    Regards,

    Sijie

  • Hi Sijie,

    Yes, it is used at many places in the code, almost in all APIs, but it is initialized only in create API, tivxCsitxCreate. We need to make sure that it is initialized to value 1, based on some create parameter, not based on the size of the object array. I think the change is smaller, i can try changing and share you the code, but dont have a way to validate it.

    Regards,

    Brijesh 

  • Hi Brijesh,

    Completely got you point. Already changed prms->numCh to 1. However, the program still stall at Fvid2_queue() somehow. 

    Yes, please share me the code if possible. That would help a lot!

    Regards,

    Sijie

  • Hello Brijesh,

    It is finally transmitting the 5th Channel of CSIRX! Thank you for the amazing support.

    The only pity is the method to offset the startChIdx and endChidx by 4 is not that elegant.

    So if you have the "single channel mode" implementation already, please do share it with me. I will be very grateful.

    Regards,

    Sijie Zhu