Hello,
In DPU_AoAProcHWA_process() there are two sleeps for 1ms each. "ClockP_usleep(1 *1000)". What is the purpose of these sleeps? Can they be removed? Since this increases linearly with the number of objects, the time it takes to process all objects can take hundreds of milliseconds.
File: \mmwave_mcuplus_sdk\ti\datapath\dpc\dpu\aoaproc\src\aoaprochwa.c
Function: DPU_AoAProcHWA_process()
SDK: 04_02_00_02
PROC CHAIN: TDM
for (pingPongIdx = 0; pingPongIdx < 2; pingPongIdx++)
{
/* Wait until EDMA outputs 3D-FFTs and Maximum peaks */
startTime1 = ClockP_getTimeUsec();
while(EDMA_readIntrStatusRegion(baseAddr, regionId, res->edmaHwaExt[pingPongIdx].chOut.channel) != 1);
EDMA_clrIntrRegion(baseAddr, regionId, res->edmaHwaExt[pingPongIdx].chOut.channel);
ClockP_usleep(1 *1000);
waitTimeLocal += ClockP_getTimeUsec() - startTime1;
if (retVal != 0)
{
goto exit;
}
if (detObjIdxProc < trueNumObjsIn)
{
#ifdef SUBSYS_MSS
{
uint32_t numHypotheses;
if (aoaHwaObj->dynLocalCfg.extMaxVelCfg.enabled == 0)
{
numHypotheses = 1;
}
else
{
numHypotheses = DPParams->numTxAntennas;
}
CacheP_inv(aoaHwaObj->azimuthFftOutMagBuf[pingPongIdx],
sizeof(uint16_t) * numHypotheses * DPU_AOAPROCHWA_NUM_ANGLE_BINS, CacheP_TYPE_ALLD);
}
#endif
numObjsOut = AoAProcHWA_angleEstimationAzimElev(aoaHwaObj,
detObjIdxProc,
pingPongIdx,
numObjsOut);
}
if (detObjIdxIn < numObjsIn)
{
/* Trigger 2D-FFT - next target */
AoAProcHWA_cfgAndTrigger_EDMA_2DFFT(aoaHwaObj,
detObjIdxIn,
pingPongIdx);
}
ClockP_usleep(1 *1000);
detObjIdxProc++;
detObjIdxIn++;
}
Thanks,
Erik