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: How to adapt the surround view cameras hotplug scene?

Part Number: TDA4VM

Hi TI experts,

When we were debugging the camera hotplug, we found that some results were not what we expected.

Action 1:Unplug one of the sv camera and then run the sv camera case.

    It is hanging in vxWaitevent() for the case.

    There are nothing display on ICC.

Action 2: Run the sv camera case when display normal on ICC, and then unplug one of the camera from the sv camera.

    The sv camera case still hanging.

    Displaying on ICC get frozen and then turn black.

  normal-------------unplug action-----------> abnormal 

After I refer  the tiovx/kernels_j7/hwa/test/test_capture.c to i mplement my functions,  but the result of action 1 & 2 is still the same.

How can  I achieve normal display of the remaining normally connected cameras when camera hotplug?

Thanks & Regards.

  • Hi xie jc,

    What's the timeout and initial_timeout value are you using when creating capture node? This is important as this variables tell capture node how long to wait before sending out error frame. Without them being set correctly, you might see vxWait waiting forever in this case. 

    Regards,

    Brijesh

  • Hi Brijesh,

    As you said, the timeout and initial_timeout value are the key point. Now I can still display it normally even if there is a camera unplugged.

    But there are something still  confuse me when I am doing camera hotplug.

    Action 1:

    power on with 4 cameras connected-->

     4 cameras run normally---------unplug action--->

     3 cameras run normally-----------reconnected the unplugged camera--->

     4 cameras still run normally-----------unplug action------->

     abnormal:4 camera image get block and then turn black.

    Q1:VX_EVENT_NODE_ERROR events only need to be registered once, right?

    Q2:I do the test many times as 4 camres run normally->unplug one of camera->reconnected unplugged camera->unplug one of camera->abnormal.There seems to be a regularpattern in this, but I am currently unable to recognize it.

    Q3:When he is abnormal, I use an oscilloscope to measure max96722 and there is a normal mipi signal output.

    Even at this point, I reconfigure the register configuration for serialization/deserialization,it is still abnormal.There are any other details that I haven't considered?

    Thanks & Regards.

  • Do you mean if you unplug the camera second time, there is no output from all camera? That should not happen..  Do you unplug the same camera or different camera in this test? 

    Q1:VX_EVENT_NODE_ERROR events only need to be registered once, right?

    Yes, no need to register event multiple times.

    Q2:I do the test many times as 4 camres run normally->unplug one of camera->reconnected unplugged camera->unplug one of camera->abnormal.There seems to be a regularpattern in this, but I am currently unable to recognize it.

    Lets first check above questions. 

    Regards,

    Brijesh

  • Hi Brijesh,

    Upload a video of my camera hotplug operation.

    Thanks & Regards.

  • Hi xie jc,

    When this error occurs, can you please press 'p' on the console and prints the performance stats? I want to check if the capture is still working or now. You might have to print multiple times to know capture status.

    Regards,

    Brijesh

  • Hi Brijesh,

    I think I had solve this problem now.

    But there are some questions that I still need your help.

    Q1:I only modify the param 3 from 0 to 5, and the param 4 from 1 to 6 for vxRegisterEvent API, It can display normally no matter what I hotplug.

    But I'm not sure what determines the values of parameters 3 and 4?Referring to the API's instructions, I believe that parameters 3 and 4 are only valid when type is VX_EVENT_GRAPH_PARAMETER_CONSUMED, but it doesn't seem like this right now.

    I hope you can help me understand how to set the parameters of the vxRegisterEvent API.

    Thanks & Regards.

  • Hi Brijesh,

    Is there any process in this question?

    Thanks & Regards.

  • Hi xie jc,

    the last parameter, ie app_value, i dont see it being used inside the framework. It is just returned back to the application, when application is waiting on for hte node error. 

    for the param, yes, it is not being used for the node error event. So can be changed. 

    But i am wondering how it gets working. Is it because of the app_value? Are you not processing this app_value in the application? 

    Regards,

    Brijesh

  • Hi Brijesh,

    Are you not processing this app_value in the application?

    I think I have not do anything for this app_value.

    There is an very urgent issue now.

    The display will flash when I unplug the camera. And then some error log print on stdout.

    I'm not sure what caused this problem. The only difference is that after running the USS function on MCU30, the CPU load of MCU20 will reach about 70%, and the display will flash at this time. But 70% CPU usage should still be within the normal range, right?

    If I block the operation of the USS function, even if it is unplugged, there will be no flashing display issue. At this time, the CPU usage rate of the MCU20 is below 30%.

    Thanks & Regards.

  • Hi xie jc,

    I'm not sure what caused this problem. The only difference is that after running the USS function on MCU30, the CPU load of MCU20 will reach about 70%, and the display will flash at this time. But 70% CPU usage should still be within the normal range, right?

    Yes, that's ok. but do you see this flashing only when camera is unplugged? Do you see this error when all 4 camera are connected and you run uss on mcu30? Is the DDR BW well within the limit?

    Regards,

    Brijesh

  • Hi Brijesh,

    but do you see this flashing only when camera is unplugged? Do you see this error when all 4 camera are connected and you run uss on mcu30?

    yes. This flashing is happening when camera is unplugged. When the all 4 cameras are connected, there will be no flashing problem even when running MCU30.

    1)When the system starts up and does not run mcu30, the CPU usage rate of mcu20 is only about 10%. At this time, there is no flashing issue with the camera whether it is plugged or unplugged.

    2)When the system starts up and run mcu30, the CPU usage rate of MCU20 is close to 70%. At this time, there is flashing when camera unpluged.

    Thanks & Regards.

  • Hi xie jc,

    1)When the system starts up and does not run mcu30, the CPU usage rate of mcu20 is only about 10%. At this time, there is no flashing issue with the camera whether it is plugged or unplugged.

    ok, that's strange. Do you see any frame drops when you print performance stats for the capture node? It looks like there may be some frame drops. Also when you unplug the camera, does deserializer require any reconfiguration? 

    Regards,

    Brijesh

  • Hi Brijesh,

    Do you see any frame drops when you print performance stats for the capture node?

    That's a good question. In fact, the frame rate is not decreasing but increasing.But using oscilloscope to measure the mipi of the deserializer has always been 30 frames

    does deserializer require any reconfiguration? 

    I didn't perform any reconfiguration operations when the camera was unplugged. I will do this test later.

    Thanks & Regards.

  • Hi Brijesh,

    Deserializer reconfiguration feedback:The reconfiguration operation did not improve the flashing issue.

    Uploading a video that shows normal display without running mcu30.(The CPU usage rate of mcu20 is around 25%)

    Thanks & Regards.

  • Hi xie jc,

    Is there a possibility that when camera is disconnected, virtual channel is getting messed up? Because otherwise we shouldn't see increase in fps. Decrease in fps can be due to some slowness in the SW chains but increase in fps could be due to incorrect virtual channel and this is coming from the deserializer. 

    Regards,

    Brijesh

  • Its strange that this happens only when USS functionality is running on mcu3_0. Which memory USS is using? Where does it store the output? Which interface are you using for receiving USS data? 

  • Hi Brijesh,

    virtual channel is getting messed up?

    What factors can cause virtual channels to be  getting messed up?

    Decrease in fps can be due to some slowness in the SW chains but increase in fps could be due to incorrect virtual channel and this is coming from the deserializer. 

    However, the mipi output of the deserializer by the oscilloscope remains stable at 30fps regardless of whether the camera is being unpluged or not.The frame rate is calculated from the capture node.

    I need to consult my colleagues who are developing on MCU30 to provide you with a response regarding the details of the USS function.

    Thanks & Regards.

  • Hi Brijesh,

    After I modify the timeout value from 90 to 200, there is no flashing even though mcu30 is run.

    I believe that setting the timeout value to 150ms should be sufficient based on this formula(33.3ms*4=133.2ms), but in fact, there will still be flickering, but the frequency of this flicker has decreased.

    Q1:Why does running mcu30 affect the functionality on mcu20?Is it because of competition for DDR resources? But I tried to adjust the priority of QoS and it didn't work.

    Q2:What is the timeout value set based on?

    Setting timeout value to 150ms.

    Thanks&Regards.

  • Hi Brijesh,

    When I unplug all 4 cameras, there is print  "Unable to add event, dropping it" all the time and never stop, only I reconnected at least one camera and the prints is stop.

    It seems that some events cannot be add successfully. But I don't know which event add failed and what cause the event add failed?

    Thanks &Regards.