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: IWR6843 hard code cli.c execution issue

Part Number: IWR6843
Dear TI Support Team,
Currently, we are doing the hard code cli.c execution and Bypass CLI as following "Bypass CLI Setting",  the hardware platform is IWR6843. Although there is no error message, but when it sends "sensorStart", it emits.
In terminal console, it shows :
 
Debug: Init Calibration Status = 0x1ffe

Done

The issue is the same as the following website on E2E, but we are still not clear about how to solve the issue based on the answers.
Could you help to give some comments on that?  How to solve the issue? Thanks a lot.
 

Bypass CLI setting

  • 1443 is base on SDK1.2 OOB demo
  • Add CLI Header in mmwave_cli.c from SDK demo CCS project MSS section

o   #include <ti/utils/cli/include/cli_internal.h>

  • Add external struct in mmwave_cli.c from SDK demo CCS project MSS section

o   extern CLI_MCB     gCLI;

  • Add external function define in Main.c from SDK demo CCS project MSS section

o   extern void MmwDemo_Bypass_CLI (void);

  • Call function in "void MmwDemo_initTask(UArg arg0, UArg arg1)" before return parameter in Main.c from SDK demo CCS project MSS section

o   MmwDemo_Bypass_CLI();

  • Add Function and configuration in mmwave_cli.c from SDK demo CCS project MSS section

#define CLI_BYPASS 1

#define MAX_RADAR_CMD               24

uint8_t* radarCmdString[MAX_RADAR_CMD] =

{

     {"sensorStop \r\n"},

     {"flushCfg \r\n"},

     {"dfeDataOutputMode 1 \r\n"},

     {"channelCfg 15 7 0 \r\n"},

     {"adcCfg 2 1 \r\n"},

     {"adcbufCfg 0 1 0 1 \r\n"},

     {"profileCfg 0 77 7 7 57.14 0 0 70 1 240 4884 0 0 30 \r\n"},

     {"chirpCfg 0 0 0 0 0 0 0 1 \r\n"},

     {"chirpCfg 1 1 0 0 0 0 0 4 \r\n"},

     {"chirpCfg 2 2 0 0 0 0 0 2 \r\n"},

     {"frameCfg 0 2 16 0 33.333 1 0 \r\n"},

     {"lowPower 0 0 \r\n"},

     {"guiMonitor 1 0 0 0 0 0 \r\n"},

     {"cfarCfg 0 2 8 4 3 0 768 \r\n"},

     {"peakGrouping 1 0 1 1 229 \r\n"},

     {"multiObjBeamForming 1 0.5 \r\n"},

     {"clutterRemoval 0 \r\n"},

     {"calibDcRangeSig 0 -5 8 256 \r\n"},

     {"compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 \r\n"},

     {"measureRangeBiasAndRxChanPhase 0 1.5 0.2 \r\n"},

     {"CQRxSatMonitor 0 3 5 123 0 \r\n"},

     {"CQSigImgMonitor 0 119 4 \r\n"},

     {"analogMonitor 1 1 \r\n"},

     {"sensorStart \r\n"},

};

 

static int32_t CLI_ByPassApi(CLI_Cfg* ptrCLICfg)

{

    //uint8_t cmdString[128];

    char* tokenizedArgs[CLI_MAX_ARGS];

    char* ptrCLICommand;

    char delimitter[] = " \r\n";

    uint32_t argIndex;

    CLI_CmdTableEntry* ptrCLICommandEntry;

    int32_t cliStatus;

    uint32_t index, idx;

    uint16_t numCLICommands = 0U;

 

    /* Sanity Check: Validate the arguments */

    if (ptrCLICfg == NULL)

    return -1;

 

    /* Cycle through and determine the number of supported CLI commands: */

    for (index = 0; index < CLI_MAX_CMD; index++)

    {

        /* Do we have a valid entry? */

        if (ptrCLICfg->tableEntry[index].cmd == NULL)

        {

            /* NO: This is the last entry */

            break;

        }

        else

        {

            /* YES: Increment the number of CLI commands */

            numCLICommands = numCLICommands + 1;

        }

    }

 

    /* Execute All Radar Commands */

    for (idx = 0; idx < MAX_RADAR_CMD; idx++)

    {

        /* Reset all the tokenized arguments: */

        memset ((void *)&tokenizedArgs, 0, sizeof(tokenizedArgs));

        argIndex = 0;

        ptrCLICommand = (char*)radarCmdString[idx];

 

        /* Set the CLI status: */

        cliStatus = -1;

 

        /* The command has been entered we now tokenize the command message */

        while (1)

        {

            /* Tokenize the arguments: */

            tokenizedArgs[argIndex] = strtok(ptrCLICommand, delimitter);

            if (tokenizedArgs[argIndex] == NULL)

                break;

 

            /* Increment the argument index: */

            argIndex++;

            if (argIndex >= CLI_MAX_ARGS)

                break;

 

            /* Reset the command string */

            ptrCLICommand = NULL;

        }

 

        /* Were we able to tokenize the CLI command? */

        if (argIndex == 0)

            continue;

 

        /* Cycle through all the registered CLI commands: */

        for (index = 0; index < numCLICommands; index++)

        {

            ptrCLICommandEntry = &ptrCLICfg->tableEntry[index];

 

            /* Do we have a match? */

            if (strcmp(ptrCLICommandEntry->cmd, tokenizedArgs[0]) == 0)

            {

                /* YES: Pass this to the CLI registered function */

                cliStatus = ptrCLICommandEntry->cmdHandlerFxn (argIndex, tokenizedArgs);

                if (cliStatus == 0)

                {

                    CLI_write ("Done\n");

                }

                else

                {

                    CLI_write ("Error %d\n", cliStatus);

                }

                break;

            }

        }

 

        /* Did we get a matching CLI command? */

        if (index == numCLICommands)

        {

            /* NO matching command found. Is the mmWave extension enabled? */

            if (ptrCLICfg->enableMMWaveExtension == 1U)

            {

                /* Yes: Pass this to the mmWave extension handler */

                cliStatus = CLI_MMWaveExtensionHandler (argIndex, tokenizedArgs);

            }

 

            /* Was the CLI command found? */

            if (cliStatus == -1)

            {

                /* No: The command was still not found */

                CLI_write ("'%s' is not recognized as a CLI command\n", tokenizedArgs[0]);

            }

        }

    }

 

    return 0;

}

void MmwDemo_Bypass_CLI (void)

{

    if (CLI_ByPassApi(&gCLI.cfg) != 0)

    {

        System_printf ("Error: Unable to CLI_ByPassApi\n");

        return;

    }

    return;

}