Other Parts Discussed in Thread: AWR6843
Tool/software:
Dear sir/madam,
i am using awr6843isk+mmavebooster card ,i m able to run out of box demo with ccs debugger mode.
my requirement is to run out of box demo with fixed generated data instead "Front end data coming Via ADC buffer".
i have gone through the sample example design available under "C:\ti\mmwave_sdk_03_06_02_00-LTS\packages\ti\datapath\dpc\objectdetection\objdethwa\test\main.c" to understand how to use fixed generated data and generate necessary "TRIGGER_FRAME" and TRIGGER_CHIRP events.
So as per my understanding the following steps need to be done in "out of box demo", in order to use fixed generated data instead of "Front end data coming Via ADC buffer":
1.need to comment execution of mmwave start--so sensor start command will reach Radar front end and so No frame event will be triggered from RF front end.
2.need to generate frame event and chrip event logic part to code
3.map the fixed generated data to ADC buffer.
I have done the above changes in the out of box demo code as shown below:
1. \ti\demo\xwr68xx\mmw\mss\mss_main.c file ,inside MmwDemo_startSensor() function commented mmwave_start () logic and invoking my user logic function "readdatalogic()"
.(screenshots are attached for reference)
2. I have added the necessary "frame event and chrip event logic part to myuser logic code (attached below):
static void readdatalogic()
{
int32_t errorCode = 0;
uint32_t frameIdx;
uint32_t numFrames=12;
uint32_t i,j,k;
int32_t retVal = 0;
DPU_RangeProcHWA_OutParams outParms;
uint16_t rxIdx;
uint16_t numChirpsPerFrameRef=96;
uint16_t numChirpsPerFrame;
uint16_t chirpIdxRef;
uint16_t numAdcSamples=256;
uint16_t numRangeBins=256;
uint16_t MAX_NUM_RX_ANTENNA=4;
uint16_t numRxAntennas=4;
numChirpsPerFrame = numChirpsPerFrameRef;
/* set the seed value*/
dataInBuffer[0] = 0x12345678;
/*This sequence of integers has a period long enough to not repeat within the data cube.
This ensures that if test passes it is not due to repetition in the cube data pattern
which may mask some computational mistake.*/
for(k = 1; k < MAX_NUM_RX_ANTENNA * numRangeBins; k++)
{
dataInBuffer[k] = (3*dataInBuffer[k-1] + 5);
}
for (frameIdx = 0; frameIdx < numFrames; frameIdx++)
{
/* send TRIGGER_FRAME here */
errorCode = MmwDemo_DPM_ioctl_blocking (gMmwMssMCB.objDetDpmHandle,
DPC_OBJDET_IOCTL__TRIGGER_FRAME,
NULL,
0);
if (errorCode < 0)
{
System_printf ("Error: Unable to send DPC_OBJDET_IOCTL__TRIGGER_FRAME [Error:%d]\n", errorCode);
}
DebugP_log0("App: DPC_OBJDET_IOCTL__TRIGGER_FRAME is processed \n");
/* process chirps loop in the frame*/
for(i=0; i< numChirpsPerFrame ; i++)
{
/* read in one chirp data */
for (j = 0; j < numRxAntennas; j++)
{
//16 byte aligned, 4 uint32 symbols
memcpy((void *)&adcDataIn[j * ((numAdcSamples+3)/4*4)], (void *)&dataInBuffer[chirpIdxRef * MAX_NUM_RX_ANTENNA * numRangeBins + j *numRangeBins], sizeof(uint32_t)*numAdcSamples);
}
errorCode = EDMA_startTransfer(gMmwMssMCB.dataPathObj.edmaHandle, EDMA_TPCC0_REQ_DFE_CHIRP_AVAIL, EDMA3_CHANNEL_TYPE_DMA);
if (errorCode != 0)
{
System_printf("Error: EDMA start Transfer returned %d\n",errorCode);
return;
}
Task_sleep(1);
}/* end of chirp loop */
}/* end of frame loop*/
}
3. mapping fixed data to adu buffer variable and necessary data creation(screenshot attached )
4. C:\ti\mmwave_sdk_03_06_02_00-LTS\packages\ti\datapath\dpc\objectdetection\objdetrangehwa\src\objdetrangehwa.c ,inside static int32_t DPC_ObjectDetection_ioctl()
added TRIGGER_FRAME (screenshot attached)
My question:
1. when i build the design with above mentioned changes ,i m getting the following build error""../objdetrangehwa.c", line 880: error #20: identifier "DPC_OBJDET_IOCTL__TRIGGER_FRAME" is undefined"
please kindly check and confirm me ,what is the issue ?
2. please confirm ,above mentioned steps are correct to run with fixed generated data instead of "Front end data coming Via ADC buffer" or any other steps need to be added?
regards,
Mani