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.

IWR6843ISK: Chirp Configs

Part Number: IWR6843ISK

Hello There,

I have to send chirp configs every time I start the GUI, is there any way to save the chirp configs in the sensor at the time of first run?? , so that, there is no need to upload the chirp configs repeatedly.  

Thanks

  • Hello,

    Yes there are a few ways to do it. In the OOB_demo in the toolbox, there is one example of hard coding the config file, but this is not as straightforward. The below method is recommended. The below example uses the 3D people counting lab as an example but it is applicable to all demos.

    • The setup of the IWR device and CLI has the following simplified flow.
      PcountDemo3D_initTask --> Pcount3DDemo_CLIInit --> CLI_open
      • General initialization task calls the CLIInit function. At the end of this CLIInit function, the CLI is opened to receive commands.
      • However, at this point there are still other initializations that need to happen before the device is ready to start. So the cfg parameters cannot be set directly after this CLIInit function, instead they should be added to the CLI_task() in cli.c (C:\ti\mmwave_sdk_VER\packages\ti\utils\cli\src)
    • In cli.c
      • Define the HCC option
        • Add "#define USE_HARD_CODED_CONFIG" to the top of the file. (You can use any macro name you like)
      • Add a char array of all the config parameters as they would appear in the .cfg file. Use '#ifdef USE_HARD_CODED_CONFIG' to enable turning off HCC functionality in the future if desired. Include an integer variable for looping through the cfg paramerters.

    #ifdef USE_HARD_CODED_CONFIG

     

    int32_t hardCodedConfigIndex;

     

    char * hardCodedConfigCommands[] =

    {

    "sensorStop ",

     "flushCfg ",

    "dfeDataOutputMode 1 ",

     …

     …

    "!!!END_OF_HARD_CODED_COMMANDS"

    };

     

    #endif

    • Include an identifier to signal the end of the commands inside the array with a '!' or other character not used in the cfg parameters.
      • e.g. "!!!END_OF_HARD_CODED_COMMANDS"
    • Inside CLI_task()
      • Before the while(1) loop
        • add a section to pause the task for further system initialization. Include some UART prints for clarity if desired.

    #ifdef USE_HARD_CODED_CONFIG

        hardCodedConfigIndex = 0;

        CLI_write ("Wait some time for system to initialize...\n");

        Task_sleep(100);

        CLI_write ("Performing hard-coded config\n");

    #endif

    • Inside the while(1) loop
      • Add the loop to read in the cha array of cfg parameters added at the top of the file. This replaces the UART_read line that would get the cfg parameter from the UART connection. Bypass this with a #ifdef/#else to revert to the UART communication if HCC is turned off.
         

    #ifdef USE_HARD_CODED_CONFIG

            /* Run hard-coded commands, one at a time until '!!!END_OF_HARD_CODED_COMMANDS' is reached: */

            if (hardCodedConfigCommands[hardCodedConfigIndex][0] != '!')

            {

                //CLI_write (hardCodedConfigCommands[hardCodedConfigIndex]);

                CLI_write ("Command\n");

                memcpy((void *)&cmdString[0], (void *)hardCodedConfigCommands[hardCodedConfigIndex],   

    strlen(hardCodedConfigCommands[hardCodedConfigIndex]));

                hardCodedConfigIndex++;

            }

            /* Accept commands from UART after all hard-coded commands done: */

            else

            {

                /* Read the command message from the UART: */

                UART_read (gCLI.cfg.cliUartHandle, &cmdString[0], (sizeof(cmdString) - 1));

            }

     

    #else

            /* Read the command message from the UART: */

            UART_read (gCLI.cfg.cliUartHandle, &cmdString[0], (sizeof(cmdString) - 1));

    #endif

    • Recompile the cli driver in the SDK using the instructions in the SDK user's guide
    • Rebuild the CSS project you are using and reflash the binary generated (or run in debug mode) onto the IWR device. On powerup, the device should start up and begin outputting data on the UART lines (or whichever output was configured in the HCC section) without waiting for user input from a GUI or otherwise.
    • If you do not wish to modify the SDK cli.c file (if you are using the SDK for multiple different projects or configurations) you can copy this file into the CCS project folder and include it in the project to build a local version overwriting the SDK file.
      • Copy files from the SDK CLI path above and place in the common src folder for the desired toolbox project. (Probably this is cli.c and cli_mmwave.c)
        "C:\ti\mmwave_industrial_toolbox_VER\labs\lab_folder\68xx_lab\src\common" (the version and specific lab should be updated to whichever lab you are modifying)

    Regards,

    Jackson

  • Hello,

    I am trying to rebuild the "Long Range People Counting" Lab without using ICBOOST or EVM board, it throws the following error:

    **** Build of configuration Debug for project long_range_people_det_68xx_dss ****
    "C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 8 all -O
    rm -f F:/ccs/long_range_people_det_68xx_dss/Debug/long_range_people_det_68xx_dss.bin
    makefile:195: recipe for target 'pre-build' failed
    process_begin: CreateProcess(NULL, rm -f F:/ccs/long_range_people_det_68xx_dss/Debug/long_range_people_det_68xx_dss.bin, ...) failed.
    gmake[1]: [pre-build] Error 2 (ignored)
    dss/subdir_rules.mk:16: recipe for target 'build-911272977' failed
    gmake[1]: *** No rule to make target 'C:/ti/ccsv8/eclipse/dss/dss_main.c', needed by 'dss/dss_main.oe674'.
    gmake[1]: *** No rule to make target 'C:/ti/ccsv8/eclipse/dss/mmw_dss.cfg', needed by 'configPkg/linker.cmd'.
    gmake[1]: *** No rule to make target 'C:/ti/ccsv8/eclipse/dss/c674x_linker.cmd', needed by 'main-build'.
    gmake[1]: *** No rule to make target 'C:/ti/ccsv8/eclipse/dss/mmw_dss_linker.cmd', needed by 'main-build'.
    gmake[2]: *** No rule to make target 'C:/ti/ccsv8/eclipse/dss/mmw_dss.cfg', needed by 'build-911272977-inproc'.
    gmake[2]: Target 'build-911272977-inproc' not remade because of errors.
    gmake[1]: *** [build-911272977] Error 2
    gmake[1]: Target 'main-build' not remade because of errors.
    gmake: *** [all] Error 2
    makefile:161: recipe for target 'all' failed
    **** Build Finished ****
  • Hello,

    This seems unrelated to the HCC modifications you may have made. But can you please confirm

    1. The project builds on your machine after importing from the toolbox without any modifications.

    2. What are the actual changes you made to your project?

    Regards,

    Jackson

  • Hello Thomas,

    1. yes I was trying to build the project after importing from the toolbox without any modifications.

    2. I haven't made any changes to the project.

  • Hello,

    This is a very strange error. Where is your project located and how did you import it into the CCS workspace?

    gmake[1]: *** No rule to make target 'C:/ti/ccsv8/eclipse/dss/dss_main.c', needed by 'dss/dss_main.oe674'.

    The above path seems to think the DSS folder in inside the CCS folder, not the workspace. This could be normal on the backend, but is not something I ever see in the console. Please make sure your toolbox folder is downloaded inside the C:/ti/ tolder and that you have imported the project using the CCS import GUI.

    Regards,

    Jackson