你好,请问我在看关于6843生命体征检测demo的相关代码。其中dss信号处理那部分处理chirp和帧的代码似乎有些模糊。我想清楚其原理和如何使用代码实现的。请问有代码位置以及讲解资源吗?
static int32_t MmwDemo_dssDataPathProcessEvents(UInt event)
{
MmwDemo_DSS_DataPathObj *dataPathObj;
volatile uint32_t startTime;
dataPathObj = &gMmwDssMCB.dataPathObj[gMmwDssMCB.subFrameIndx];
/* Handle dataPath events */
switch(event)
{
case MMWDEMO_CHIRP_EVT:
/* The following commented calls to Clock_tickStart()/Stop() APIs are
shown as an example of how to disable BIOS timer ticks
to prevent the timer interrupt from disrupting the 1D chirp processing.
This may be necessary for very small chirp times
when the CPU does not have enough MIPS to process the timer interrupt
if it happens during the 1D processing.*/
//Clock_tickStop();
/* Increment event stats */
gMmwDssMCB.stats.chirpEvt++;
/* Start CQ EDMA */
//MmwDemo_dssDataPathStartCQEdma(dataPathObj);
{
uint16_t chirpIndex;
for (chirpIndex = 0; chirpIndex < dataPathObj->numChirpsPerChirpEvent; chirpIndex++)
{
MmwDemo_processChirp(dataPathObj, (uint16_t) chirpIndex);
}
}
//Clock_tickStart();
gMmwDssMCB.dataPathContext.chirpProcToken--;
dataPathObj->timingInfo.chirpProcessingEndTime = Cycleprofiler_getTimeStamp();
if (dataPathObj->chirpCount == 0)
{
MmwDemo_waitEndOfChirps(dataPathObj);
Load_update();
dataPathObj->timingInfo.activeFrameCPULoad = Load_getCPULoad();
dataPathObj->cycleLog.interChirpProcessingTime = gCycleLog.interChirpProcessingTime;
dataPathObj->cycleLog.interChirpWaitTime = gCycleLog.interChirpWaitTime;
gCycleLog.interChirpProcessingTime = 0;
gCycleLog.interChirpWaitTime = 0;
startTime = Cycleprofiler_getTimeStamp();
MmwDemo_interFrameProcessing(dataPathObj);
dataPathObj->timingInfo.interFrameProcCycles = (Cycleprofiler_getTimeStamp() - startTime);
dataPathObj->cycleLog.interFrameProcessingTime = gCycleLog.interFrameProcessingTime;
dataPathObj->cycleLog.interFrameWaitTime = gCycleLog.interFrameWaitTime;
gCycleLog.interFrameProcessingTime = 0;
gCycleLog.interFrameWaitTime = 0;
#if 0
/* Sending range bias and Rx channel phase offset measurements to MSS and from there to CLI */
if(dataPathObj->cliCommonCfg->measureRxChanCfg.enabled)
{
MmwDemo_measurementResultOutput (dataPathObj);
}
#endif
/* Sending detected objects to logging buffer */
MmwDemo_dssDataPathOutputLogging (dataPathObj);
dataPathObj->timingInfo.interFrameProcessingEndTime = Cycleprofiler_getTimeStamp();
}
break;
case MMWDEMO_FRAMESTART_EVT:
/* Increment event stats */
gMmwDssMCB.stats.frameStartEvt++;
Load_update();
dataPathObj->timingInfo.interFrameCPULoad = Load_getCPULoad();
MmwDemo_dssAssert(dataPathObj->chirpCount == 0);
break;
case MMWDEMO_BSS_FRAME_TRIGGER_READY_EVT:
/* Increment event stats */
gMmwDssMCB.stats.frameTrigEvt++;
break;
default:
break;
}
return 0;
}
/**
* @b Description
* @n
* Function to stop Data Path on DSS. Assume BSS has been stopped by mmWave already.
* This also sends the STOP done message back to MSS to signal the procssing
* chain has come to a stop.
*
* @retval
* Not Applicable.
*/