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: TDA4VH-Q1

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH, TDA4VM

Dear 

For TDA4VH  surround  camera   test demo . 

The first time I  test the capture is normal. After exiting the test demo , if I run the demo without reboot the TDA4VH, there will be an exception in the front of the saved image, such as NOK.png. Please help analyze . 

The first image is problematic, as if the upper part of the image has been segmented. The second image is OK .

1) If you reboot the device and run the test demo again, the saved images are OK .

2) The configuration of the camera driver will only run during first initialization.

3) When exiting, the following resources were released and no obvious errors were found

4) The code for releasing resources can be found in the attachment log for the following fields: app_run_graph is done

tda4vh.log

  • Hi support team :

         Is there any method that can assist in analyzing this issue?

  • Hi

    , there will be an exception in the front of the saved image, such as NOK.png.

    In the attached log, I couldn't find any exception. Could you please let me know what is the exception seen?

    I see that you are running "vx_avm_cam_desay.out", could you let me know which application is this and what are the nodes involved in the graph?

    Also, I see that there are few garbage collections happening in context release, could you please check these warnings and release all the data objects ?

    Regards,

    Nikhil

  • Hi zheng,

    Do you also reset camera and deserializer between two runs? This looks like camera and deserializer going out of sync.. 

    Regards,

    Brijesh

  • No, I didn't reset camera and optimizer between two runs .

    Do you mean it needs to be reset?

  • Hi Nikhil Dasan : 

    vx_avm_cam_desay.out  out is ported from tda4VM and has not been modified.  Mainly involving two nodes

    add_graph_parameter_by_node_index(obj->graph, obj->captureNode, 1);
    add_graph_parameter_by_node_index(obj->graph, obj->mosaic_node, 1);

  • Yes, you may need to reset these two components. It seems they are out of sync.. 

  • Hi Brijesh :

    May I ask if it is the camera and deserializer out of sync, or is the test demo and camera drivers out of sync?

    It would be strange if the camera and deserializer is out of sync, as it will only be initialized once after power on .

    If it is a test demo and camera driver issue that is not synchronized, it should be a general issue and will also affect our implementation of hot plugin solution. Could you tell me which part of the testing program has dependencies?

  • Hi,

    To elaborate on the above point, could you please confirm if you are reconfiguring the deserializer once you stop streaming the camera and start streaming again? (i.e., stopping the application and starting again)

    If not, this needs to be done in order to sync the Deserializer and camera.

    This is currently being done in all the camera related demos in the SDK.

    Regards,

    Nikhil

  • HI  :

    I conducted the following experiments, and I think it is more likely a problem with test demo. Only by restarting the device that the test demo can save images   normally.

    After testing the demo and running it again, the image data may not be synchronized. How do I troubleshoot it? How to open the log or how to view node information?

    1) experiments 1 

    a) run test demo

    b) run fullly deserializer/serializer configuration

    c) save the image and it can be displayed normally

    d) Do not exit the test demo, conifig the deserializer to turn off stream, and then turn on stream again

    e) save the image and it can be displayed normally

    f) Exit the test demo normally (config the deserializer to  turn off stream)

    g) Wait for a period of time, do not restart TDA4VH, and then start the test demo again

    h) config the deserializer to restart the stream

    i) save image, abnormal image display

    2) experiments 2

    Replacing only step h) to “run fullly deserializer/serializer configuration” ,  but saving the result image is still abnormal

    Thank you!

  • HI    :

    I reinitialized the Deserializer/Serializer, but the problem still exists, What two components do you refer to when you mention reset these two components?

    In addition ,I conducted the following experiments, and I think it is more likely a problem with test demo. Only by restarting the device that the test demo can save images   normally. After testing the demo and running it again, the image data may not be synchronized. 

    1) experiments 1 

    a) run test demo

    b) run fullly deserializer/serializer configuration

    c) save the image and it can be displayed normally

    d) Do not exit the test demo, conifig the deserializer to turn off stream, and then turn on stream again

    e) save the image and it can be displayed normally

    f) Exit the test demo normally (config the deserializer to  turn off stream)

    g) Wait for a period of time, do not restart TDA4VH, and then start the test demo again

    h) config the deserializer to restart the stream

    i) save image, abnormal image display

    2) experiments 2

    Replacing only step h) to “run fullly deserializer/serializer configuration” ,  but saving the result image is still abnormal

    Thank you!

  • Hi Brijesh :

    May I ask if there are any issues with my testing steps? Which step needs to be readjusted?

    Thank you!

  • Hi zheng,

    are the steps H and B exactly same? Are you doing same configuration in serializer and deserializer? Also when you are doing this configuration, what's the state of CSIRX? Is the driver already created and PHY configuration already set? 

    Regards,

    Brijesh

  • HI Brijesh :

    1) For experiments 2, the steps H and B are exactly the same, with the same parameters configured for serializer and deserializer, but the problem still exists.

    2) How can I check the CSIRX status you mentioned? Isn't CSIRX initialized during the startup phase?

    3) In the test demo
    a) tivx_capture_params_init is execution on the app_create_graph function.
    b) Serializer and deserializer will be reconfig on function app_run_graph.

  • hi zheng,

    How do you restart the application? Are you completely closing it and then restarting it from the Linux/QNX console? I wanted to check the driver open count and confirm that every time you start it, it should be only 1. Can we please add some debug code and confirm the same? 

    In the API CsirxDrv_create, in the file ti-processor-sdk-rtos-j784s4-evm-08_06_01_03\pdk_j784s4_08_06_01_03\packages\ti\drv\csirx\src\csirx_drv.c, can you add below highlighted code, at around line number 392?

    if (retVal == FVID2_SOK)
    {
        drvHandle = virtContext;
        virtContext->state = CSIRX_DRV_STATE_CREATED;
        virtContext->inUse = CSIRX_DRV_USAGE_STATUS_IN_USE;
        captObj->numVirtContUsed[instId]++;
        instObj->numDrvInstCreated++;

        GT_1trace(CsirxTrace, GT_ERR, "CSIRX Driver Create Count = %d\r\n", instObj->numDrvInstCreated);
    }

    Regards,

    Brijesh

  • Got it , I will try and reply to you ,thank you ! 

  • Hi Brijesh  :

    After adding the log, test printing twice .

    CSIRX Driver Create Count=1

    But the problem still exists , Please refer to the log for details.

    tda4vh-add-CSIRX-status-log.log

    Thank you!

  • Hi Zheng,

    Updating this ticket to keep it active. 

    Regards,

    Brijesh

  • Hi Brijesh  :

    This question also confuses me. May I ask which function is used to obtain the camera buffer? Can I add some printing here to confirm that the buffer is misaligned?

    Thank you!

  • Hi zheng,

    Most likely, capture output is graph parameter in your case, so you are getting capture buffer mapped in the application space and could get access to the captured frame. You can use it to check the buffer content. Most likely it would be same as what is getting displayed. 

    This is coming due to some sync issue between sensor, SERDES, CSIRX. 

    Regards,

    Brijesh

  • Hi Brijesh :

    I think I found the reason: the LDC node was created, but it was not properly released after the process ended.

    The following code does not use 1U==obj->ldc_enable  is used to control, but other LDC logic codes use this variable for control

    vxSetNodeTarget(obj->node_ldc, VX_TARGET_STRING, TIVX_TARGET_VPAC_LDC1);

    My question is that , are there any related logs or device nodes that can view the created nodes or resources?

    I didn't see any obvious logs in the log. 

    Thank you!

  • Hi Zheng,

    Well, one way is, you can press 'p' to get the performance stats of the graph and then can come to know the nodes created in the graph. In the framework, graph object knows the elements created under it, so in a way possible to get this information. 

    Regards,

    Brijesh

  • Hi Brijesh :

    After enter 'p',  it can run , and then I cannot enter other commands. Even if I try to enter 'x', it is not successful.

    The only is use ctrl+'c' to force exit. Please help to check it ?

    1) The code is as follows:

    case 'p':
    appPerfStatsPrintAll();
    tivx_utils_graph_perf_print(obj->graph);
    appPerfPointPrint(&obj->fileio_perf);
    appPerfPointPrint(&obj->total_perf);
    printf("\n");
    appPerfPointPrintFPS(&obj->total_perf);
    printf("\n");


    2) Error screenshot

      

  • Hi Zheng,

    Is the graph still running? Because i dont see performance stats completely printed. May be one of the enabled core is halted. Can you please check? If the graph is running fine, then one of the enabled core is not working fine. Can you then try disabling this core? You would probably require JTAG + CCS to check the status of the cores.

    Regards,

    Brijesh

  • Hi Brijesh:

    This main issue has been resolved, please close this issue. Thank you!

  • Thanks Zheng, closing this ticket.