This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642: Overflow risk in SRR datapath init function

Part Number: AWR1642

Hello team,

In the SRR demo, we have call the datapath init function, but it may have an overflow risk, can you please take a look in it?

"C:\ti\mmwave_automotive_toolbox_2_7_1\labs\lab0002_short_range_radar\src\dss\dss_main.c" 

The code had already loop for NUM_SUBFRAMES times in dss_main.c. But in MmwDemo_dataPathInit1Dstate, the code do the for loop again.

Is here any risk when the NUM_SUBFRAMES not equals 1?

//In dss_main.c line 384
    /* Initialize the state counters. */
    for (ik = 0, obj = &gSrrDSSMCB.dataPathObj[0]; ik < NUM_SUBFRAMES; ik ++, obj ++)
    {
        MmwDemo_dataPathInit1Dstate(obj);
    }

//In dss_data_path.c
void MmwDemo_dataPathInit1Dstate(MmwDemo_DSS_DataPathObj *obj)
{
    int8_t subframeIndx = 0;

    for (subframeIndx = 0; subframeIndx < NUM_SUBFRAMES; subframeIndx++, obj++)
    {
        obj->chirpCount = 0;
        obj->dopplerBinCount = 0;
        obj->txAntennaCount = 0;
        obj->chirpTypeCount = 0;
    }

    /* reset profiling logs before start of frame */
    memset((void *)&gCycleLog, 0, sizeof(cycleLog_t));
}

Thanks,

Wesley