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.

TDA3: External Command to Start/Stop a Radar Csecase Chain

Part Number: TDA3

Hi,

We would like to send commands to TDA3 to control its run state. In the future, we would also like to send in commands to configure radar chirp config parameters. Is there same code to show how this can be done? We have a UI running externally and would like to send commands to TDA3 over Ethernet interface. So far we have used the network_rx to receive Ethernet data output from TDA3 for post analysis.

Thanks,

--Khai

  • Khai,

    As part of the Processor SDK Radar 3.6 release (likely to come by end of this year) we are adding a feature to control the Radar parameters using file based inputs. The example being show cased as part of the 3.6 release is reading the configuration file via SD card based storage. The file read can be extended to network based read as well.

    For starting and stopping the radar you can even use the standard usecase menu options to create custom menu options in the usecase where you can call the APIs to start and stop the radar.

    Thanks and Regards,
    Piyali
  • Hi Piyali,

    Please elaborate on how to create API from external host to start/stop the radar or the processing chain. Is there steps to follow?

    Thanks,

    --Khai

  • Khai,

    There are already APIs available:
    retVal = Bsp_ar12xxStartRadar(); to start
    retVal = Bsp_ar12xxStopRadar(); to stop

    You would just need to call these in Chains_radarobjectdetectdisplay switch case statement where the default options are today to stop the usecase, print the stats.

    Thanks and Regards,
    Piyali
  • Thank you. That helps...

  • Hi Piyali,

    It's more desirable for us to be able to start/stop the radar usecase over Ethernet rather than the console interface through the usecase switch statement. Is there a mechanism in place to perform this request in the Vision SDK?

    Thanks,
    --Khai

  • Khai,

    Please look at vision_sdk\apps\tools\network_tools\network_ctrl  and vision_sdk\apps\src\rtos\modules\network_ctrl for this.

    There is a network user guide as well which gives an overview of network_ctrl tool.

    vision_sdk\docs\FeatureSpecificUserGuides\VisionSDK_UserGuide_NetworkTools.pdf

    Regards,

    Piyali

  • Hi Piyali,

    I have looked and know that network control mechanism exists. However, it seems to only controlling individual link and not the chain. How to start/stop the chain from network? I guess another option is to start/stop the issCapture link which essentially will start/stop the chain. Is there a side effect to doing so say if I stop it and start it back?

    Thanks,

    --Khai 

  • Hi Piyali,

    Start/Stop the IssCapture link will work only an existing chain existed. We need a network protocol request to actually start the chain itself and stopping the chain and call upon a different chain. This doesn't exist in current network tool. Is there guidelines (Doc) to establish this feature?

    Thanks,

    --Khai

  • Khai,

    The ISS capture Link stop and start only would not help you if you would like to start the whole chain and then run something else and then start again.

    Can you please help us understand your full flow? What do you really mean by a new chain? Do you want to start and stop a complete usecase chain?

    BTW, we also support network console, the whole console output comes on the network.

    For the network_ctrl, the examples I had mentioned in the previous post would help you get started to implement any custom mechanism you would like to implement to start and stop the usecase.

    Thanks and Regards,
    Piyali
  • Hi Piyali,

    We have external PC GUI application that control the processing of the radar usecase. In addition to be able to start/stop the usecase simply clicking a UI button, we have UI feature that can download various chirp config to the radar all done through network request. Thus, it's desirable for us to make this a network request into the TDA3 to start/stop the usecase chain at anytime. We cannot rely on the console interface whether it be COM or Ethernet. Therefore, I was thinking maybe starting/stopping the IssCapture of the chain usecase would effectively start/stop the usecase as this network request is supported in the current Vision SDK framework. 

    Thanks,

    --Khai

  • PS. To be able to do this, we need the Vision SDK framework to support this. You mentioned v3.06 will support chirp config download from network and I am counting on that. We also need to start/stop the usecase network request. For example, I have 2 radar usecases and I want to exercise one and then the other. How can I stop the currently running one and start the other usecase?

    Thanks,
    --Khai
  • Hi Khai,

    The out of box support on Processor SDK Vision/Radar 3.6 would be for the SD card based read of the parameters. You would need to make the necessary modifications to extend this to network. (The concept and principals are the same whether reading the file from SD or Network).

    Regarding starting and stopping of the usecase, you would need to add a function to the network control link which would start and stop the usecase through network:

    Eg. NetworkCtrl_registerHandler("startuc_1", NetworkCtrl_cmdHandlerStartUC1);

    If you are running the network on IPU1_1, you would need to send a message to IPU1_0 to start a particular usecase. Within the usecase, you can disable all the console Interaction to call the stop usecase again from a similar network handler.

    Kindly note since these are custom changes corresponding to what you would like in your application, you can use the basic building blocks provided in Processor SDK Radar to create this.

    Thanks and Regards,

    Piyali

  • Hi Piyali,

    I understand and know how to do all you said. The trick is in the NetworkCtrl_cmdHandlerStartUC1 function. My questions:

    1. Since the framework is to control on a link thru the use of its linkID, and not chain (usecase), how to send a message to IPU1_0 to stop the current running chain? You can only send a message to a link running on the IPU1_0. The framework has the concept of a chain but not controlling its state.

    2. Would you please provide a more concrete instructions (steps) to follow since you you said in your statement "If you are running the network on IPU1_1, you would need to send a message to IPU1_0 to start a particular usecase. Within the usecase, you can disable all the console Interaction to call the stop usecase again from a similar network handler." is too vague to follow.

    3. Each chain has a function calls chains_radar_xxx_StopAndDeleteApp(&chainsObj); Right now this function is called if the user enter a 0 in the console to stop the chain. How can this function be triggered from the NetworkCtrl_cmdHandlerStartUC1()? 

    Thanks,

    --Khai

  • Khai,

    You need to first create 2 commands on IPU1_0
    CHAINS_EVENT_USECASE_START
    CHAINS_EVENT_USECASE_END

    You would need to register a handler on the IPU1_0 for handling these events:
    Void Chains_usecasestartstop_EventHandler(UInt32 cmd, Void *pPrm)
    {
    if (CHAINS_EVENT_USECASE_START== cmd)
    {
    set a global object as to which usecase to run based on pPrm.
    Post a semaphore for starting the usecase.
    }
    else if (CHAINS_EVENT_USECASE_END== cmd)
    {
    Post a semaphore for stopping the usecase.
    }
    else
    {
    ; /* Nothing to do */
    }
    }

    Register this handler with the system thread:
    SystemLink_registerHandler(Chains_usecasestartstop_EventHandler);

    In the main usecase selection thread under vision_sdk\apps\src\rtos\radar\src\common\chains_radar_main.c, instead of taking a user input from the console, you need to pend on the semaphore posted in Chains_usecasestartstop_EventHandler, read the global value of the usecase to be started.

    In the usecase specific file (eg. vision_sdk\apps\src\rtos\radar\src\usecases\radar_capture_process\chains_radarcaptureprocess.c), again wait for the semaphore for the usecase stop command from Chains_usecasestartstop_EventHandler and then call the usecase stop (set done = TRUE).

    In the networking on the IPU1_1, you need to send the message to IPU1_1 using the below:
    System_linkControl(
    (UInt32)SYSTEM_LINK_ID_IPU1_0,
    (UInt32)CHAINS_EVENT_USECASE_START,
    (Ptr)&usecaseId,
    sizeof(uint32_t),
    (Bool)FALSE);

    System_linkControl(
    (UInt32)SYSTEM_LINK_ID_IPU1_0,
    (UInt32)CHAINS_EVENT_USECASE_END,
    (Ptr)NULL,
    0,
    (Bool)FALSE);

    Thanks and Regards,
    Piyali