上一篇文章,我們拿MATLAB走了一遍1D處理的流程,這一期我們來看看C代碼如何實作的,首先回顧一下void MmwDemo_interChirpProcessing()函數,代碼如下:
/**
* @b Description
* @n
* Interchirp processing. It is executed per chirp event, after ADC
* buffer is filled with chirp samples.
*
* @retval
* Not Applicable.
*/
void MmwDemo_interChirpProcessing(MmwDemo_DSS_DataPathObj *obj, uint8_t chirpPingPongId)
{
uint32_t antIndx, waitingTime;
volatile uint32_t startTime;
volatile uint32_t startTime1;
MmwDemo_DSS_dataPathContext_t *context = obj->context;
waitingTime = 0;
startTime = Cycleprofiler_getTimeStamp();
/* Kick off DMA to fetch data from ADC buffer for first channel */
EDMA_startDmaTransfer(context->edmaHandle[MMW_DATA_PATH_EDMA_INSTANCE],
MMW_EDMA_CH_1D_IN_PING);
/* 1d fft for first antenna, followed by kicking off the DMA of fft output */
for (antInd