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.

IWR6843: How can I take data multiple times with mmWaveStudio CLI Tool?

Part Number: IWR6843
Other Parts Discussed in Thread: AWR2243, AWR1243

https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1010495/awr1843-how-can-i-take-data-multiple-times-with-mmwavestudio-cli-tool

I have a question about the following described in the URL above.

Current version of CLI tool requires device reset if you need to restart the capture.

Although that is possible but requires change in Studio CLI exe and device application code.


Can you please tell me the specific part to be fixed?
I am considering using the CLI Tool to acquire multiple data.

  • Hi,

    That is current limitation to able to capture only once in a exe run, and restart to capture new data.

  • Hi,

    Thank you for your comment.
    Yes, I know that there are limitations.
    I want to software control everything, so if there is a way to reset the IWR6843, I would like to incorporate that into the CLI Tool.

  • Hi,

    To restart the device you can force a warm reset to the device and for that you need to add a CLI command to the application.

    mmw_cli.c: 

    /**
    * @b Description
    * @n
    * This is the CLI Handler to do warm reset to the device
    *
    * @param[in] argc
    * Number of arguments
    * @param[in] argv
    * Arguments
    *
    * \ingroup CLI_UTIL_INTERNAL_FUNCTION
    *
    * @retval
    * Success - 0
    * @retval
    * Error - <0
    */

    static int32_t CLI_MMWaveRestart (int32_t argc, char* argv[])
    {
    /* topRCM->SOFTSYSRST */
    uint32_t* regAddr = (uint32_t*)0xFFFFE11C;

    /* ACK PC tool before warm reset */
    MmwDemo_CLI_write ("Done\n");

    /* wait for 100msec, let UART data 'done' streamed out */
    Task_sleep(100);

    /* Warm reset */
    *regAddr = 0xAD;

    return 0;
    }

    Then add these line at bottom (before MmwDemo_CLI_open call) of MmwDemo_CLIInit function


    gCliMcb.cfg.tableEntry[cnt].cmd = "deviceRestart";
    gCliMcb.cfg.tableEntry[cnt].helpString = "No arguments";
    gCliMcb.cfg.tableEntry[cnt].cmdHandlerFxn = CLI_MMWaveRestart;
    cnt++;

    Rebuild the application and then flash binary to the device.

    Code change on the PC tool size

    under readCliCommand function of gui\mmw_cli_tool\mmw_main.c

    else if (_stricmp(inputCmd, "deviceRestart") == 0)
    {
    /* for AWR1243 and AWR2243 device SPI interface is used to
    * communicate with mmwave Sensor: Make sure that DCA1000 or DevPack board is connected with BOOST */
    if ((rlDevGlobalCfgArgs.mmwaveDevVariant == AWR1243) || \
    (rlDevGlobalCfgArgs.mmwaveDevVariant == AWR2243))
    {
    //TODO: Fill up this to reset AWR12/2243 device
    }
    else
    {
    /* invoke UART CLI Command 'deviceRestart' to mwmave sensor */
    serialComm_Write(gUartComPortHandle, "deviceRestart \r\n");
    }
    /* Set the state after restarting the device */
    rlDevGlobalCfgArgs.gModuleExecState.mmwDevCfgState = MMW_DEV_SENSOR_STOP;
    gCliCmdRcd = CLI_CMD_DEV_RESTART;
    }

    Rebuild the tool.

    With this change you will able to send 'deviceRestart command over mmwave_studio_cli.exe console to restart the device.

    P.S.- I don't have access to EVM right now, so this code is not being tested now.

    Regards,

    Jitendra 

  • Thank you, Jitendra!
    I was able to implement the process with the fix you provided.

    I appreciate your quick response.

  • So are you able to run PC tool as well as device application to reset it.

    And capture the data multiple times without terminating PC exe tool.??

  • Hi, Jitendra

    Data acquisition is performed as follows.

    1. start mmwave_studio_cli.exe
    2. dcastop
    3. deviceRestart
    4. quit
    5. return to 1

    If mmwave_studio_cli.exe is not terminated, it will not be able to acquire data continuously.

    1. start mmwave_studio_cli.exe
    2. dcastop
    3. deviceRestart
    4. dcastart

    I get the following error
    StartRecordData(): UDP write failed: 10038[ERROR] DCA1000 Trigger error!

    Best Regards,

  • I was afraid of this only, as I mentioned that back to back data capture stop-start was not being verified with Studio CLI.

  • I've set up the system to restart mmwave_studio_cli.exe every time, so that's not a problem.
    Thank you!