如题。我拿到IWR1443BOOST后第一时间运行了官方提供的demo演示程序,只不过我发现每次链接上电脑需要在网页mmwave demo visualizer里发送cfg配置文件到开发板上,然后开发板才能工作,我想问下能不能将配置文件直接烧写进开发板实现上电直接开始测量并发送数据,如果可以,我该怎么去实现。
如题。我拿到IWR1443BOOST后第一时间运行了官方提供的demo演示程序,只不过我发现每次链接上电脑需要在网页mmwave demo visualizer里发送cfg配置文件到开发板上,然后开发板才能工作,我想问下能不能将配置文件直接烧写进开发板实现上电直接开始测量并发送数据,如果可以,我该怎么去实现。
你好,
请参考以下步骤
Bypass CLI setting
#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;
}