Other Parts Discussed in Thread: IWR1843
Hello All,
I am using MRR Lap with mrr only configuration, SDK 3.6 LTE.
I am trying to conserve power by stopping the RF sensor when not needed by calling MRR_MSS_CLISensorStop(2, dummy); from "mss_mrr_cli.c"
But when I try to start again using MRR_MSS_CLISensorStart(2, dummy); the processor is stuck at MMWave_start() API specifically in MMWave_startLink() API
The only modification I made is changing gMrrMSSMCB.runningStatus to false in MRR_MSS_CLISensorStop:
static int32_t MRR_MSS_CLISensorStop(int32_t argc, char* argv[])
{
int32_t errCode;
if (gMrrMSSMCB.runningStatus == false) {
return 0; // Already stopped.
}
/* The sensor can only be stopped; if the link has been configured */
if (gMrrMSSMCB.cfgStatus == true) {
/* Stop the sensor */
if (MMWave_stop(gMrrMSSMCB.ctrlHandle, &errCode) < 0) {
/* Error: Unable to stop the mmWave control module */
System_printf("Error: mmWave stop failed [Error code %d]\n", errCode);
return -1;
}
System_printf("Debug: Sensor has been stopped\n");
/* The link is no longer configured. */
gMrrMSSMCB.runningStatus = false;
return 0;
} else {
/* Invalid CLI use case; doing a sensor stop multiple times. Inform the user and return an error code. */
System_printf("Error: Sensor has already been stopped. Reconfigure and start the sensor if required\n");
return -1;
}
}
static int32_t MRR_MSS_CLISensorStart(int32_t argc, char* argv[])
{
MMWave_CalibrationCfg calibrationCfg;
int32_t errCode;
if (gMrrMSSMCB.runningStatus == true) {
/* Already running. */
return 0;
}
/* The sensor can only be started; if the link has been configured */
if (gMrrMSSMCB.cfgStatus == true) {
/* Initialize the calibration configuration: */
memset((void*)&calibrationCfg, 0, sizeof(MMWave_CalibrationCfg));
/* Populate the calibration configuration: */
calibrationCfg.dfeDataOutputMode = MMWave_DFEDataOutputMode_ADVANCED_FRAME;
calibrationCfg.u.chirpCalibrationCfg.enableCalibration = true;
calibrationCfg.u.chirpCalibrationCfg.enablePeriodicity = true;
calibrationCfg.u.chirpCalibrationCfg.periodicTimeInFrames = 10U;
System_printf("Debug: Sensor will start momentarily. \n");
/* Start the mmWave: */
if (MMWave_start(gMrrMSSMCB.ctrlHandle, &calibrationCfg, &errCode) < 0) {
/* Error: Unable to start the mmWave control module */
System_printf("Error: mmWave start failed [Error code %d]\n", errCode);
return -1;
}
gMrrMSSMCB.runningStatus = true;
return 0;
} else {
/* Invalid CLI use case; doing a sensor start without executing the basic or advanced configuration
* command. Inform the user and return an error code. */
System_printf("Error: Please ensure that the XXXCfg CLI command is invoked before starting the sensor\n");
return -1;
}
}
Note: I don't need to change any configuration between stops.
Can anyone help getting this feature to work without this issue. Thank you