Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642
Tool/software: TI C/C++ Compiler
Hi,
FYSA, I am using the AWR1642 2.0 (SDK ver 2.0).
I look in the cli_mmwave.c code and notice how most every command specifically correlates to the inputs for each API discussed in the SDK, except for bpmCfg. Why is this? bpmCfg in the code is even referenced as bpmCfgAdvanced... are they even the same API? What file retrieves the inputs from the bpmCfg API on the CLI script?
Ex of one that correlates: advFrameCfg
{
"advFrameCfg",
#ifdef CLI_MMWAVE_HELP_SUPPORT
"<numOfSubFrames> <forceProfile> <numFrames> <triggerSelect> <frameTrigDelay>",
#else
NULL,
#endif
CLI_MMWaveAdvFrameCfg
},
static int32_t CLI_MMWaveAdvFrameCfg (int32_t argc, char* argv[])
{
rlAdvFrameCfg_t advFrameCfg;
/* Sanity Check: Minimum argument check */
if (argc != 6)
{
CLI_write ("Error: Invalid usage of the CLI command\n");
return -1;
}
/* Sanity Check: Frame configuration is valid only for the Frame or
Advanced Frame Mode: */
if (gCLIMMWaveControlCfg.dfeDataOutputMode != MMWave_DFEDataOutputMode_ADVANCED_FRAME)
{
CLI_write ("Error: Configuration is valid only if the DFE Output Mode is Advanced Frame\n");
return -1;
}
/* Initialize the frame configuration: */
memset ((void *)&advFrameCfg, 0, sizeof(rlAdvFrameCfg_t));
/* Populate the frame configuration: */
advFrameCfg.frameSeq.numOfSubFrames = atoi (argv[1]);
advFrameCfg.frameSeq.forceProfile = atoi (argv[2]);
advFrameCfg.frameSeq.numFrames = atoi (argv[3]);
advFrameCfg.frameSeq.triggerSelect = atoi (argv[4]);
advFrameCfg.frameSeq.frameTrigDelay = (uint32_t)((float)atof(argv[5]) * 1000000 / 5);
/* Save Configuration to use later */
memcpy ((void *)&gCLIMMWaveControlCfg.u.advancedFrameCfg.frameCfg,
(void *)&advFrameCfg, sizeof(rlAdvFrameCfg_t));
return 0;
}
bpmCfg:
{
"bpmCfgAdvanced",
#ifdef CLI_MMWAVE_HELP_SUPPORT
"<chirpStartIdx> <chirpEndIdx> <constBpmVal>",
#else
NULL,
#endif
CLI_MMWaveBPMCfgAdvanced
},
static int32_t CLI_MMWaveBPMCfgAdvanced (int32_t argc, char* argv[])
{
rlBpmChirpCfg_t bpmChirpCfg;
int32_t errCode;
/* Sanity Check: Minimum argument check */
if (argc != 4)
{
CLI_write ("Error: Invalid usage of the CLI command\n");
return -1;
}
/* Sanity Check: BPM Chirp configuration is valid only for the Frame or
Advanced Frame Mode: */
if ((gCLIMMWaveControlCfg.dfeDataOutputMode != MMWave_DFEDataOutputMode_FRAME) &&
(gCLIMMWaveControlCfg.dfeDataOutputMode != MMWave_DFEDataOutputMode_ADVANCED_FRAME))
{
CLI_write ("Error: BPM Configuration is valid only if the DFE Output Mode is frame or advanced frame\n");
return -1;
}
/* Initialize the chirp configuration: */
memset ((void *)&bpmChirpCfg, 0, sizeof(rlBpmChirpCfg_t));
/* Populate the chirp configuration: */
bpmChirpCfg.chirpStartIdx = atoi (argv[1]);
bpmChirpCfg.chirpEndIdx = atoi (argv[2]);
bpmChirpCfg.constBpmVal = atoi (argv[3]);
/* Add the BPM chirp configuration to the list */
if (MMWave_addBpmChirp (gCLI.cfg.mmWaveHandle, &bpmChirpCfg, &errCode) == NULL)
{
/* Error: Unable to add the BPM configuration. Return the error code. */
return errCode;
}
return 0;
}
Thanks!
George