TI中文支持网
TI专业的中文技术问题搜集分享网站

AWR2944EVM: ES1.0 mmwave_mcuplus_sdk_04_02_00_02 mmWave Demo paramsets about dopplerProcess

Part Number:AWR2944EVM

 In the millimeter wave demo Mentioned in mmwave_mcuplus_sdk_04_02_00_02, there is function named 'DPU_DopplerProcHWA_configHwaCFARAzimFFT' which is called by the function named 'DPU_DopplerProcHWA_config' used by doppler DPU module

in the function DPU_DopplerProcHWA_configHwaCFARAzimFFT,the total number of HWA paramSets used is defined by ’DOPPLERPROCHWA_DDMA_AZIMCFAR_NUM_HWA_PARAMSETS which is equal 8,But the actual number configured in the code is 10,Why?

static inline int32_t DPU_DopplerProcHWA_configHwaCFARAzimFFT
(DPU_DopplerProcHWA_Obj*obj,DPU_DopplerProcHWA_Config*cfg
)
{HWA_ParamConfighwaParamCfg[DOPPLERPROCHWA_DDMA_AZIMCFAR_NUM_HWA_PARAMSETS];HWA_InterruptConfigparamISRConfig;uint32_tparamsetIdx = 0;uint32_thwParamsetIdx = cfg->hwRes.hwaCfg.azimCfarStageHwaStateMachineCfg.paramSetStartIdx;int32_terrCode = 0U;uint8_tdestChan;uint32_tfftSizeTemp;uint32_tcfarAvgRight, cfarAvgLeft, cfarGuardCells;memset((void*) &hwaParamCfg, 0, DOPPLERPROCHWA_DDMA_AZIMCFAR_NUM_HWA_PARAMSETS * sizeof(HWA_ParamConfig));/***********************//* PING DUMMY PARAMSET *//***********************/
{hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_DMA;hwaParamCfg[paramsetIdx].triggerSrc = hwParamsetIdx;hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_NONE;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}
}/*******************************//* PING AZIM FFT PARAMSET*//*******************************/
{{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_FFT;/* PREPROC CONFIG */hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.preProcCfg.dcEstResetMode = HWA_DCEST_INTERFSUM_RESET_MODE_NOUPDATE;hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.preProcCfg.dcSubEnable = HWA_FEATURE_BIT_DISABLE;/* Enable complex multiply mode and ensure reading is from common config regs, not the RAM */hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.preProcCfg.complexMultiply.cmultMode = HWA_COMPLEX_MULTIPLY_MODE_VECTOR_MULT;hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.preProcCfg.complexMultiply.modeCfg.vectorMultiplyMode1.cmultScaleEn = HWA_FEATURE_BIT_ENABLE;/* ACCELMODE CONFIG (FFT) */hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftEn = HWA_FEATURE_BIT_ENABLE;fftSizeTemp = obj->cfarAzimFFTCfg.numAzimFFTBins;if(fftSizeTemp % 3 == 0){hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftSize = mathUtils_ceilLog2(fftSizeTemp/3);hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftSize3xEn = HWA_FEATURE_BIT_ENABLE;}else{hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftSize = mathUtils_ceilLog2(fftSizeTemp);hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftSize3xEn = HWA_FEATURE_BIT_DISABLE;}hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.butterflyScaling = 0;hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.windowEn = HWA_FEATURE_BIT_DISABLE; /* No windowing at this stage */hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.postProcCfg.magLogEn = HWA_FFT_MODE_MAGNITUDE_LOG2_ENABLED;hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.postProcCfg.fftOutMode = HWA_FFT_MODE_OUTPUT_DEFAULT;hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.postProcCfg.max2Denable = HWA_FEATURE_BIT_ENABLE;/* SOURCE CONFIG */hwaParamCfg[paramsetIdx].source.srcAddr = DPU_DOPPLERHWADDMA_ADDR_AZIMFFT_PING_IN;hwaParamCfg[paramsetIdx].source.srcAcnt = cfg->staticCfg.numRxAntennas * cfg->staticCfg.numAzimTxAntennas - 1; /* this is samples - 1 */hwaParamCfg[paramsetIdx].source.srcAIdx = obj->cfarAzimFFTCfg.azimFFTIOCfg.input.bytesPerSample;hwaParamCfg[paramsetIdx].source.srcBcnt = obj->numDopplerBins/obj->dopplerDemodCfg.numBandsTotal - 1;hwaParamCfg[paramsetIdx].source.srcBIdx = cfg->staticCfg.numRxAntennas * cfg->staticCfg.numAzimTxAntennas * obj->cfarAzimFFTCfg.azimFFTIOCfg.input.bytesPerSample;hwaParamCfg[paramsetIdx].source.srcRealComplex = obj->cfarAzimFFTCfg.azimFFTIOCfg.input.isReal;if(obj->cfarAzimFFTCfg.azimFFTIOCfg.input.bytesPerSample == 2 ||(obj->cfarAzimFFTCfg.azimFFTIOCfg.input.bytesPerSample == 4 &&(!obj->cfarAzimFFTCfg.azimFFTIOCfg.input.isReal))){hwaParamCfg[paramsetIdx].source.srcWidth = HWA_SAMPLES_WIDTH_16BIT;}else{hwaParamCfg[paramsetIdx].source.srcWidth = HWA_SAMPLES_WIDTH_32BIT;}hwaParamCfg[paramsetIdx].source.srcSign = obj->cfarAzimFFTCfg.azimFFTIOCfg.input.isSigned;hwaParamCfg[paramsetIdx].source.srcConjugate = 0;hwaParamCfg[paramsetIdx].source.srcScale = 8;/* DEST CONFIG */hwaParamCfg[paramsetIdx].dest.dstAddr = DPU_DOPPLERHWADDMA_ADDR_AZIMFFT_PING_OUT;hwaParamCfg[paramsetIdx].dest.dstAcnt = fftSizeTemp - 1;hwaParamCfg[paramsetIdx].dest.dstAIdx = obj->cfarAzimFFTCfg.azimFFTIOCfg.output.bytesPerSample;hwaParamCfg[paramsetIdx].dest.dstBIdx = fftSizeTemp * obj->cfarAzimFFTCfg.azimFFTIOCfg.output.bytesPerSample;hwaParamCfg[paramsetIdx].dest.dstRealComplex = obj->cfarAzimFFTCfg.azimFFTIOCfg.output.isReal;if(obj->cfarAzimFFTCfg.azimFFTIOCfg.output.bytesPerSample == 2 ||(obj->cfarAzimFFTCfg.azimFFTIOCfg.output.bytesPerSample == 4 &&(!obj->cfarAzimFFTCfg.azimFFTIOCfg.output.isReal))){hwaParamCfg[paramsetIdx].dest.dstWidth = HWA_SAMPLES_WIDTH_16BIT;}else{hwaParamCfg[paramsetIdx].dest.dstWidth = HWA_SAMPLES_WIDTH_32BIT;}hwaParamCfg[paramsetIdx].dest.dstSign = obj->cfarAzimFFTCfg.azimFFTIOCfg.output.isSigned;hwaParamCfg[paramsetIdx].dest.dstConjugate = HWA_FEATURE_BIT_DISABLE;hwaParamCfg[paramsetIdx].dest.dstScale = 0;hwaParamCfg[paramsetIdx].dest.dstSkipInit = 0;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}

#if 0 /* This cannot be done here since the AzimFFT output data is needed by the subsequent DPUs and hence there'sa possibility of conflict between HWA and DMA */errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaAzimFFTOut.pingPong[0].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}  
#endif

}}/*******************************//* PING DOPPLER CFAR PARAMSET  *//*******************************/
{{cfarAvgRight = obj->cfarAzimFFTCfg.cfarCfg.winLen >> 1;cfarAvgLeft = obj->cfarAzimFFTCfg.cfarCfg.winLen >> 1;cfarGuardCells = obj->cfarAzimFFTCfg.cfarCfg.guardLen;paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_CFAR;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.peakGroupEn = obj->cfarAzimFFTCfg.cfarCfg.peakGroupingEn;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.operMode = HWA_CFAR_OPER_MODE_LOG_INPUT_REAL; /* cfarInpMode = 1, cfarLogMode = 1, cfarAbsMode = 00b */hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.numGuardCells = cfarGuardCells;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.nAvgDivFactor = obj->cfarAzimFFTCfg.cfarCfg.noiseDivShift;//not applicable in CFAR_OShwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.cyclicModeEn = obj->cfarAzimFFTCfg.cfarCfg.cyclicMode;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.nAvgMode = obj->cfarAzimFFTCfg.cfarCfg.averageMode;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.numNoiseSamplesRight = cfarAvgRight;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.numNoiseSamplesLeft =  cfarAvgLeft;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.outputMode = HWA_CFAR_OUTPUT_MODE_I_PEAK_IDX_Q_NEIGHBOR_NOISE_VAL;if (obj->cfarAzimFFTCfg.cfarCfg.averageMode == HWA_NOISE_AVG_MODE_CFAR_OS)
	{hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.cfarOsKvalue = obj->cfarAzimFFTCfg.cfarCfg.osKvalue;hwaParamCfg[paramsetIdx].accelModeArgs.cfarMode.cfarOsEdgeKScaleEn = obj->cfarAzimFFTCfg.cfarCfg.osEdgeKscaleEn;
	}hwaParamCfg[paramsetIdx].source.srcAddr = DPU_DOPPLERHWADDMA_ADDR_CFAR_PING_IN;hwaParamCfg[paramsetIdx].source.srcAcnt = obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal - 1+ 2 * cfarAvgRight + cfarGuardCells+ 2 * cfarAvgLeft + cfarGuardCells;hwaParamCfg[paramsetIdx].source.srcAIdx = obj->cfarAzimFFTCfg.numAzimFFTBins * obj->cfarAzimFFTCfg.cfarIOCfg.input.bytesPerSample;hwaParamCfg[paramsetIdx].source.srcBIdx = obj->cfarAzimFFTCfg.cfarIOCfg.input.bytesPerSample;hwaParamCfg[paramsetIdx].source.srcBcnt = obj->cfarAzimFFTCfg.numAzimFFTBins - 1;hwaParamCfg[paramsetIdx].source.srcRealComplex = obj->cfarAzimFFTCfg.cfarIOCfg.input.isReal;hwaParamCfg[paramsetIdx].source.srcScale = 8;if(obj->cfarAzimFFTCfg.cfarIOCfg.input.bytesPerSample == 2 ||(obj->cfarAzimFFTCfg.cfarIOCfg.input.bytesPerSample == 4 &&(!obj->cfarAzimFFTCfg.cfarIOCfg.input.isReal))){hwaParamCfg[paramsetIdx].source.srcWidth = HWA_SAMPLES_WIDTH_16BIT;}else{hwaParamCfg[paramsetIdx].source.srcWidth = HWA_SAMPLES_WIDTH_32BIT;}hwaParamCfg[paramsetIdx].source.srcSign = obj->cfarAzimFFTCfg.cfarIOCfg.input.isSigned;hwaParamCfg[paramsetIdx].source.srcConjugate = 0;hwaParamCfg[paramsetIdx].source.srcAcircShift = (obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal)- (2 * cfarAvgRight + cfarGuardCells);if ((obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal) % 3 == 0){ /* If numSamples % 3 == 0 */hwaParamCfg[paramsetIdx].source.srcCircShiftWrap3 = 1; /* 'b001, means wrap in A dim */hwaParamCfg[paramsetIdx].source.srcAcircShiftWrap = mathUtils_ceilLog2((obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal) / 3);}else{hwaParamCfg[paramsetIdx].source.srcCircShiftWrap3 = 0;hwaParamCfg[paramsetIdx].source.srcAcircShiftWrap = mathUtils_ceilLog2(obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal);}/* DEST CONFIG */hwaParamCfg[paramsetIdx].dest.dstAddr = DPU_DOPPLERHWADDMA_ADDR_CFAR_PING_OUT;hwaParamCfg[paramsetIdx].dest.dstAcnt = cfg->hwRes.maxCfarPeaksToDetect - 1;hwaParamCfg[paramsetIdx].dest.dstAIdx = obj->cfarAzimFFTCfg.cfarIOCfg.output.bytesPerSample;hwaParamCfg[paramsetIdx].dest.dstBIdx = (obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal) * obj->cfarAzimFFTCfg.cfarIOCfg.output.bytesPerSample;hwaParamCfg[paramsetIdx].dest.dstRealComplex = obj->cfarAzimFFTCfg.cfarIOCfg.output.isReal;if(obj->cfarAzimFFTCfg.cfarIOCfg.output.bytesPerSample == 2 ||(obj->cfarAzimFFTCfg.cfarIOCfg.output.bytesPerSample == 4 &&(!obj->cfarAzimFFTCfg.cfarIOCfg.output.isReal))){hwaParamCfg[paramsetIdx].dest.dstWidth = HWA_SAMPLES_WIDTH_16BIT;}else{hwaParamCfg[paramsetIdx].dest.dstWidth = HWA_SAMPLES_WIDTH_32BIT;}hwaParamCfg[paramsetIdx].dest.dstSign = obj->cfarAzimFFTCfg.cfarIOCfg.output.isSigned;hwaParamCfg[paramsetIdx].dest.dstConjugate = HWA_FEATURE_BIT_DISABLE;hwaParamCfg[paramsetIdx].dest.dstScale = 8;hwaParamCfg[paramsetIdx].dest.dstSkipInit = 0;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaCfarOut.pingPong[0].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}

}}/*******************************//* PING LOCAL MAX PARAMSET*//*******************************/
{{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_LOCALMAX;/* PREPROC CONFIG */hwaParamCfg[paramsetIdx].accelModeArgs.localMaxMode.neighbourBitmask = 85; /* 0 1 0 1 0 1 0 1, "+" shaped comparison */hwaParamCfg[paramsetIdx].accelModeArgs.localMaxMode.thresholdBitMask = 0; /* ~ (1 1), enable comparison row wise and column wise */hwaParamCfg[paramsetIdx].accelModeArgs.localMaxMode.thresholdMode = 3; /* 1 1, use Max2D internal statistics for thresholding instead of SW based thresholds *//* SOURCE CONFIG */hwaParamCfg[paramsetIdx].source.srcAddr = DPU_DOPPLERHWADDMA_ADDR_LOCALMAX_PING_IN;hwaParamCfg[paramsetIdx].source.srcAcnt = 3 - 1; /* Fixed for Local Max */hwaParamCfg[paramsetIdx].source.srcAIdx = obj->cfarAzimFFTCfg.numAzimFFTBins * obj->cfarAzimFFTCfg.localMaxIOCfg.input.bytesPerSample;hwaParamCfg[paramsetIdx].source.srcBcnt = obj->cfarAzimFFTCfg.numAzimFFTBins / 4 - 1 + 1;hwaParamCfg[paramsetIdx].source.srcBIdx = 8; /* Fixed for Local Max */hwaParamCfg[paramsetIdx].source.srcCcnt = (obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal) - 1;hwaParamCfg[paramsetIdx].source.srcCIdx = obj->cfarAzimFFTCfg.numAzimFFTBins * obj->cfarAzimFFTCfg.localMaxIOCfg.input.bytesPerSample;if ((cfg->staticCfg.numAzimTxAntennas) % 3 == 0){ /* If numSamples % 3 == 0 */hwaParamCfg[paramsetIdx].source.srcCircShiftWrap3 = 2; /* 'b020, means wrap in B dim */hwaParamCfg[paramsetIdx].source.srcBcircShiftWrap = mathUtils_ceilLog2((obj->cfarAzimFFTCfg.numAzimFFTBins/3) / 4);}else{hwaParamCfg[paramsetIdx].source.srcCircShiftWrap3 = 0;hwaParamCfg[paramsetIdx].source.srcBcircShiftWrap = mathUtils_ceilLog2(obj->cfarAzimFFTCfg.numAzimFFTBins / 4);}hwaParamCfg[paramsetIdx].source.wrapComb = (obj->numDopplerBins / obj->dopplerDemodCfg.numBandsTotal)* obj->cfarAzimFFTCfg.numAzimFFTBins * obj->cfarAzimFFTCfg.localMaxIOCfg.input.bytesPerSample;hwaParamCfg[paramsetIdx].source.srcRealComplex = 0; /* Fixed for Local Max */hwaParamCfg[paramsetIdx].source.srcWidth = HWA_SAMPLES_WIDTH_32BIT; /* Fixed for Local Max */hwaParamCfg[paramsetIdx].source.srcSign = obj->cfarAzimFFTCfg.localMaxIOCfg.input.isSigned;hwaParamCfg[paramsetIdx].source.srcConjugate = 0;hwaParamCfg[paramsetIdx].source.srcScale = 0;/* DEST CONFIG */hwaParamCfg[paramsetIdx].dest.dstAddr = DPU_DOPPLERHWADDMA_ADDR_LOCALMAX_PING_OUT;/* dstAcnt = ceil(numAzimFFTBins/32) - 1dstBIdx = 4 * ceil(numAzimFFTBins/32) */if(obj->cfarAzimFFTCfg.numAzimFFTBins % 32 == 0){hwaParamCfg[paramsetIdx].dest.dstAcnt = obj->cfarAzimFFTCfg.numAzimFFTBins/32 - 1;hwaParamCfg[paramsetIdx].dest.dstBIdx = 4 * obj->cfarAzimFFTCfg.numAzimFFTBins/32;}else{hwaParamCfg[paramsetIdx].dest.dstAcnt = obj->cfarAzimFFTCfg.numAzimFFTBins/32 + 1 - 1;hwaParamCfg[paramsetIdx].dest.dstBIdx = 4 * (obj->cfarAzimFFTCfg.numAzimFFTBins/32 + 1);}hwaParamCfg[paramsetIdx].dest.dstAIdx = 4; /* Fixed for Local Max */hwaParamCfg[paramsetIdx].dest.dstRealComplex = obj->cfarAzimFFTCfg.localMaxIOCfg.output.isReal;hwaParamCfg[paramsetIdx].dest.dstWidth = HWA_SAMPLES_WIDTH_32BIT;  /* Fixed for Local Max */hwaParamCfg[paramsetIdx].dest.dstSign = obj->cfarAzimFFTCfg.localMaxIOCfg.output.isSigned;hwaParamCfg[paramsetIdx].dest.dstConjugate = HWA_FEATURE_BIT_DISABLE;hwaParamCfg[paramsetIdx].dest.dstScale = 0;hwaParamCfg[paramsetIdx].dest.dstSkipInit = 0;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaLocalMaxOut.pingPong[0].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}

}}/* While the AZIM FFT out EDMA trasfer could have been chained to the localmax out EDMA transfer directly, we observed thatthe ISR for the Azim transfer was not being entered. Hence this is a workaround till the issue gets resolved. *//*****************************************//* PING DUMMY AZIM FFT TRANSFER PARAMSET *//*****************************************/
{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;hwaParamCfg[paramsetIdx].triggerSrc = hwParamsetIdx;hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_NONE;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaAzimFFTOut.pingPong[0].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}  

}/***********************//* PONG DUMMY PARAMSET *//***********************/
{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_DMA;hwaParamCfg[paramsetIdx].triggerSrc = hwParamsetIdx;hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_NONE;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}
}/*******************************//* PONG AZIM FFT PARAMSET*//*******************************/
{{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx] = hwaParamCfg[DPU_DOPPLERHWADDMA_AZIMFFT_PING_HWA_PARAMSET_RELATIVE_IDX];hwaParamCfg[paramsetIdx].source.srcAddr = DPU_DOPPLERHWADDMA_ADDR_AZIMFFT_PONG_IN;hwaParamCfg[paramsetIdx].dest.dstAddr = DPU_DOPPLERHWADDMA_ADDR_AZIMFFT_PONG_OUT;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}

#if 0errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaAzimFFTOut.pingPong[1].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}
#endif

}}/*******************************//* PONG CFAR-OS PARAMSET*//*******************************/
{{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx] = hwaParamCfg[DPU_DOPPLERHWADDMA_CFAR_PING_HWA_PARAMSET_RELATIVE_IDX];hwaParamCfg[paramsetIdx].source.srcAddr = DPU_DOPPLERHWADDMA_ADDR_CFAR_PONG_IN;hwaParamCfg[paramsetIdx].dest.dstAddr = DPU_DOPPLERHWADDMA_ADDR_CFAR_PONG_OUT;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaCfarOut.pingPong[1].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}
}}/*******************************//* PONG LOCAL MAX PARAMSET*//*******************************/
{{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx] = hwaParamCfg[DPU_DOPPLERHWADDMA_LOCALMAX_PING_HWA_PARAMSET_RELATIVE_IDX];hwaParamCfg[paramsetIdx].source.srcAddr = DPU_DOPPLERHWADDMA_ADDR_LOCALMAX_PONG_IN;hwaParamCfg[paramsetIdx].dest.dstAddr = DPU_DOPPLERHWADDMA_ADDR_LOCALMAX_PONG_OUT;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaLocalMaxOut.pingPong[1].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}

}}/* While the AZIM FFT out EDMA trasfer could have been chained to the localmax out EDMA transfer directly, we observed thatthe ISR for the Azim transfer was not being entered. Hence this is a workaround till the issue gets resolved. *//*****************************************//* PONG DUMMY AZIM FFT TRANSFER PARAMSET *//*****************************************/
{paramsetIdx++;hwParamsetIdx++;hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_IMMEDIATE;hwaParamCfg[paramsetIdx].triggerSrc = hwParamsetIdx;hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_NONE;errCode = HWA_configParamSet(obj->hwaHandle,hwParamsetIdx,&hwaParamCfg[paramsetIdx],NULL);if (errCode != 0){goto exit;}errCode = HWA_getDMAChanIndex(obj->hwaHandle, cfg->hwRes.edmaCfg.azimCfarEdmaCfg.edmaAzimFFTOut.pingPong[1].channel, &destChan);if (errCode != 0){goto exit;}/* enable the DMA hookup to this paramset so that data gets copied out */paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;paramISRConfig.dma.dstChannel = destChan;errCode = HWA_enableParamSetInterrupt(obj->hwaHandle, hwParamsetIdx, &paramISRConfig);if (errCode != 0){goto exit;}  

}

exit:return(errCode);
}

Gary Lu:

I can't see the photo, can I upload it again?

赞(0)
未经允许不得转载:TI中文支持网 » AWR2944EVM: ES1.0 mmwave_mcuplus_sdk_04_02_00_02 mmWave Demo paramsets about dopplerProcess
分享到: 更多 (0)