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.

AWR6843: AWR6843 HWA 2DFFT

Part Number: AWR6843

Hi Ti,

 I checked the Demo documentation and code, and rearranged the problem.
1. Currently based on the HWA in the demo project path "C:\ti\mmwave_sdk_03_05_00_04\packages\ti\demo\xwr18xx", transplant it to the AWR6843 project, it can be compiled successfully, 1DFFT can also run normally, but 2DFFT cannot pass normally.
2. Is "xwr18xx" and "AWR6843" incompatible? How to fix compatibility issues?Thanks!

Best Regards,
Russell

  • Hi Russell,

    Could you help me understand why you are trying to migrate the 18xx OOB demo to 68xx? This would be just the equivalent 68xx OOB demo, which is already provided in the SDK. If you are looking for the HWA only version on 68xx, you should look at the version provided in the SDK at <install_dir>\mmwave_sdk_03_05_00_04\packages\ti\demo\xwr64xx

    Best Regards,
    Alec

  • Hi Alec,

    Thanks for your reply!

    1. The reason for trying to migrate 18xx OOB demo to 68xx is that I only see the part containing HWA under "18xx OOB demo".
    2. There is no HWA version in the path <install_dir>\mmwave_sdk_03_05_00_04\packages\ti\demo\xwr64xx, only "18xx OOB demo" contains HWA.
    3. Where should I get the "68xx OOB demo" about including HWA.
    4. If I could't get the "68xx OOB demo" containing HWA, how could I solve the compatibility problem? 

    Best Regards,
    Russell

  • Russell,

    Since the 6443 part does not contain a DSP like its 6843 counterpart, the entirety of the processing is done on the R4F and the HWA. The 64xx OOB demo in the mmWave SDK uses the ObjDetHWA processing chain, and would be the best example of how to best use the HWA for processing. Let me know if something is still unclear here.

    Best Regards,
    Alec

  • Hi Alec,

    1. Maybe my explanation is not very clear, Don't focus on 6443 part.
    2. My question now is how to implement 1DFFT&2DFFT of HWA on AWR6843. There is no HWA about AWR6843 in the Demo project,Please provide support for HWA on AWR6843.

    Best Regards,
    Russell

  • Hi Russell,

    My apologies for not being more clear here. All 64xx demos run with no issues on the 68xx device, with no porting necessary. Since 64xx have no DSP, ALL calculations are done using the HWA for 64xx demos, which is why I am suggesting that you use the 64xx version of the Out of Box Demo. Please let me know if this still unclear.

    Best Regards,
    Alec

  • Hi Alec,

    I checked the HWA project in 64xxDemo. Since MEM_0 and MEM_1 are only 16K, the amount of data transferred through EDMA in Demo is 24K at one time, which has exceeded 16K. I have the following questions:
    1. When the amount of data transferred by EDMA to MEM_0 & MEM_1 is 24K each time, the amount of data has exceeded 16K. How is it handled in the Demo?
    2. How much data is appropriate for EDMA to carry at one time?
    3. How much data can HWA perform 2DFFT on at one time?

    Best Regards,
    Russell

  • Russell,

    If you'd like to know more at this level of granularity, I would recommend you first go through the related documentation for this demo, as much of what you are asking is covered already in the documentation. Below are some of the docs that I would recommend you take a look at:

    • <mmWave_SDK>/packages/ti/demo/xwr64xx/mmw/docs/doxygen/html/index.html (Demo documentation)
    • <mmWave_SDK>/packages/ti/datapath/dpc/objectdetection/objdethwa/docs/doxygen/html/index.html (Processing Chain Documentation)
    • <mmWave_SDK>/packages/ti/datapath/dpu/rangeproc/docs/doxygen/html/index.html (1st FFT Documentation)
    • <mmWave_SDK>/packages/ti/datapath/dpc/dpu/dopplerproc/docs/doxygen/html/index.html (2nd FFT Documentation)
    • <mmWave_SDK>/packages/ti/drivers/edma/docs/doxygen/html/index.html (EDMA driver Documentation)
    • <mmWave_SDK>/packages/ti/drivers/hwa/docs/doxygen/html/index.html (HWA Driver Documentation)
    • https://www.ti.com/lit/ug/swru526b/swru526b.pdf (HWA User's Guide Part 1)
    • https://www.ti.com/lit/ug/swru527a/swru527a.pdf (HWA User's Guide Part 2)

    Best Regards,
    Alec

  • Hi Alec,

    1. I've got the project working now, but I'm running into the following issues:
    I set the default 1dfft data and then transferred it to MEM_0&MEM_1 for 2DFFT through EDMA. When debugging, I found that the data in MEM_0&MEM_1 is the default data I set, MEM_2 also has data output, but MEM_3 is all 0.

    2. Here is the code part :

    void HWAutil_configDopplerFFT(HWA_Handle handle,
    uint32_t paramSetStartIdx,
    uint32_t dopplerFftSize,
    uint32_t dopplerBinsPerRangeBin,
    uint8_t numVirtualAnt,
    uint32_t numRangeBinsPerIter,
    uint32_t windowOffsetIdx,

    uint8_t dmaTriggerSourcePing,
    uint8_t dmaTriggerSourcePong,
    uint8_t dmaDestChannelPing,
    uint8_t dmaDestChannelPong,

    uint16_t hwaMemSourcePingOffset,
    uint16_t hwaMemSourcePongOffset,
    uint16_t hwaMemDestPingOffset,
    uint16_t hwaMemDestPongOffset,
    uint32_t option)
    {
    HWA_ParamConfig hwaParamCfg[HWAUTIL_NUM_PARAM_SETS_2D];
    uint32_t paramsetIdx = 0;
    int32_t errCode = 0;
    uint32_t k;
    HWA_InterruptConfig paramISRConfig;
    uint32_t numDopplerBins = dopplerFftSize;

    memset( (void*) &hwaParamCfg[paramsetIdx], 0, sizeof(HWA_ParamConfig));

    //Ping Doppler FFT
    hwaParamCfg[paramsetIdx].triggerMode = HWA_TRIG_MODE_DMA; //Immediate following first - in demo this should be HWA_TRIG_MODE_DFE
    hwaParamCfg[paramsetIdx].dmaTriggerSrc = dmaTriggerSourcePing; //Immediate following first - in demo this should be HWA_TRIG_MODE_DFE
    hwaParamCfg[paramsetIdx].accelMode = HWA_ACCELMODE_FFT; //do FFT

    hwaParamCfg[paramsetIdx].source.srcAddr = hwaMemSourcePingOffset; // address is relative to start of MEM0
    hwaParamCfg[paramsetIdx].source.srcAcnt = dopplerFftSize - 1; //size in samples - 1 

    hwaParamCfg[paramsetIdx].source.srcAIdx = numVirtualAnt * sizeof(uint32_t); 
    hwaParamCfg[paramsetIdx].source.srcBcnt = numVirtualAnt - 1; //no iterations here 
    hwaParamCfg[paramsetIdx].source.srcBIdx = dopplerFftSize*sizeof(uint32_t); //sizeof(uint32_t); //should be dont care // 4
    hwaParamCfg[paramsetIdx].source.srcShift = 0; //no shift
    hwaParamCfg[paramsetIdx].source.srcCircShiftWrap = 0; //no shift
    hwaParamCfg[paramsetIdx].source.srcRealComplex = HWA_SAMPLES_FORMAT_COMPLEX; //complex data
    hwaParamCfg[paramsetIdx].source.srcWidth = HWA_SAMPLES_WIDTH_16BIT; //16-bit
    hwaParamCfg[paramsetIdx].source.srcSign = HWA_SAMPLES_SIGNED; //signed
    hwaParamCfg[paramsetIdx].source.srcConjugate = 0; //no conjugate
    hwaParamCfg[paramsetIdx].source.srcScale = 0;
    hwaParamCfg[paramsetIdx].source.bpmEnable = 0; //bpm removal not enabled
    hwaParamCfg[paramsetIdx].source.bpmPhase = 0; //dont care

    hwaParamCfg[paramsetIdx].dest.dstAddr = hwaMemDestPingOffset; // address is relative to start of MEM0
    hwaParamCfg[paramsetIdx].dest.dstAcnt = dopplerFftSize - 1; //this is samples - 1
    hwaParamCfg[paramsetIdx].dest.dstAIdx = numVirtualAnt * sizeof(uint32_t); 
    hwaParamCfg[paramsetIdx].dest.dstBIdx = sizeof(uint32_t); //should be dont care
    hwaParamCfg[paramsetIdx].dest.dstRealComplex = HWA_SAMPLES_FORMAT_COMPLEX; //same as input - complex
    hwaParamCfg[paramsetIdx].dest.dstWidth = HWA_SAMPLES_WIDTH_16BIT; //same as input - 16 bit
    hwaParamCfg[paramsetIdx].dest.dstSign = HWA_SAMPLES_SIGNED; //same as input - signed
    hwaParamCfg[paramsetIdx].dest.dstConjugate = 0; //no conjugate
    hwaParamCfg[paramsetIdx].dest.dstScale = 8;
    hwaParamCfg[paramsetIdx].dest.dstSkipInit = 0; // no skipping

    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftEn = 1;
    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftSize = log2Approx(dopplerFftSize);

    /* scaling is enabled in all stages except in the first one because of the
    * Hanning window scaling by half */
    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.butterflyScaling = (dopplerFftSize - 1) >> 1;

    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.interfZeroOutEn = 0; //disabled
    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.windowEn = 0; //enabled
    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.windowStart = windowOffsetIdx; //start of window RAM
    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.winSymm = 1; //symmetric - only need 1/2 of coefficients
    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.winInterpolateMode = 0; //fftsize is less than 1K

    hwaParamCfg[paramsetIdx].accelModeArgs.fftMode.fftOutMode = HWA_FFT_MODE_OUTPUT_DEFAULT;

    hwaParamCfg[paramsetIdx].complexMultiply.mode = HWA_COMPLEX_MULTIPLY_MODE_DISABLE;
    errCode = HWA_configParamSet(handle, paramSetStartIdx+paramsetIdx, &hwaParamCfg[paramsetIdx], NULL);
    if (errCode != 0)
    {
    System_printf("HWA_configParamSet(%d) returned %d\n", paramSetStartIdx+paramsetIdx, errCode);
    MmwDemo_dssAssert (0);
    return;
    }

    /* Enable the DMA hookup to this paramset so that data gets copied out */
    paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;
    paramISRConfig.dma.dstChannel = dmaDestChannelPing; //EDMA channel to trigger to copy the data out
    paramISRConfig.cpu.callbackArg = NULL;
    errCode = HWA_enableParamSetInterrupt(handle, paramSetStartIdx+paramsetIdx, &paramISRConfig);
    if (errCode != 0)
    {
    System_printf("HWA_enableParamSetInterrupt(PING DMA) returned %d\n",errCode);
    MmwDemo_dssAssert (0);
    return;
    }


    //Pong Doppler FFT

    paramsetIdx++;
    hwaParamCfg[paramsetIdx] = hwaParamCfg[paramsetIdx -1];
    hwaParamCfg[paramsetIdx].source.srcAddr = hwaMemSourcePongOffset;
    hwaParamCfg[paramsetIdx].dest.dstAddr = hwaMemDestPongOffset;
    hwaParamCfg[paramsetIdx].dmaTriggerSrc = dmaTriggerSourcePong;
    errCode = HWA_configParamSet(handle, paramSetStartIdx + paramsetIdx, &hwaParamCfg[paramsetIdx], NULL);

    /* Enable the DMA hookup to the last paramset */
    paramISRConfig.interruptTypeFlag = HWA_PARAMDONE_INTERRUPT_TYPE_DMA;
    paramISRConfig.dma.dstChannel = dmaDestChannelPong; //EDMA channel to trigger to copy the data out
    paramISRConfig.cpu.callbackArg = NULL;
    errCode = HWA_enableParamSetInterrupt(handle, paramSetStartIdx + paramsetIdx, &paramISRConfig);

    }


    void MmwDemo_config2D_HWA(MmwDemo_DSS_DataPathObj *obj, uint16_t subframe)
    {
    int32_t errCode;
    uint32_t dopplerBinsPerRangeBin;
    HWA_CommonConfig hwaCommonConfig;

    /* Disable the HWA */
    errCode = HWA_enable(obj->hwaHandle,0);
    if (errCode != 0)
    {
    //retCode = HWA_TEST_ERROR;
    System_printf("Error: HWA_enable(1) returned %d\n",errCode);
    return;
    }

    dopplerBinsPerRangeBin = obj->numDopplerBins; //for MRR, there is one chirp type

    /***************************************/
    /* Doppler FFT chain */
    /***************************************/
    HWAutil_configDopplerFFT(obj->hwaHandle,
    MMW_HWA_START_PARAMSET_SF0_2D, // paramSetStartIdx,
    obj->numDopplerBins, // dopplerFftSize,
    dopplerBinsPerRangeBin, // doppler bins (chirps) per range bin,
    obj->numVirtualAntennas, // numVirtualAnt,
    MMW_NUM_RANGE_BINS_PER_TRANSFER, // numRangeBinsPerIter,
    obj->hwa_2DwinOff,

    MMW_HWA_DMA_TRIGGER_SOURCE_2D_PING,
    MMW_HWA_DMA_TRIGGER_SOURCE_2D_PONG,
    MMW_HWA_DMA_DEST_CHANNEL_2D_PING,
    MMW_HWA_DMA_DEST_CHANNEL_2D_PONG,

    ADDR_TRANSLATE_CPU_TO_HWA(MMW_HWA_2D_INP_PING), //hwaMemSourcePingOffset
    ADDR_TRANSLATE_CPU_TO_HWA(MMW_HWA_2D_INP_PONG), //hwaMemSourcePongOffset
    ADDR_TRANSLATE_CPU_TO_HWA(MMW_HWA_2D_OUT_PING), //hwaMemDestPingOffset
    ADDR_TRANSLATE_CPU_TO_HWA(MMW_HWA_2D_OUT_PONG), //hwaMemDestPongOffset
    DATA_PATH_CHAIN_SEPARATE_LOGMAG);

    /***********************/
    /* HWA COMMON CONFIG */
    /***********************/
    /* Config Common Registers */
    hwaCommonConfig.configMask =
    HWA_COMMONCONFIG_MASK_NUMLOOPS |
    HWA_COMMONCONFIG_MASK_PARAMSTARTIDX |
    HWA_COMMONCONFIG_MASK_PARAMSTOPIDX |
    HWA_COMMONCONFIG_MASK_FFT1DENABLE |
    HWA_COMMONCONFIG_MASK_INTERFERENCETHRESHOLD;


    hwaCommonConfig.numLoops = obj->numRangeBins/2;//obj->numRangeBins/(2*MMW_NUM_RANGE_BINS_PER_TRANSFER);
    hwaCommonConfig.paramStartIdx = MMW_HWA_START_PARAMSET_SF0_2D;
    hwaCommonConfig.paramStopIdx = MMW_HWA_START_PARAMSET_SF0_2D + 2;
    hwaCommonConfig.fftConfig.fft1DEnable = HWA_FEATURE_BIT_DISABLE;
    hwaCommonConfig.fftConfig.interferenceThreshold = 0xFFFFFF;
    errCode = HWA_configCommon(obj->hwaHandle,&hwaCommonConfig);
    if (errCode != 0)
    {
    //retCode = HWA_TEST_ERROR;
    System_printf("Error: HWA_configCommon returned %d\n",errCode);
    return;
    }
    }

    Best Regards,
    Russell

  • Hi Russell,

    Unfortunately, debugging through your code is a bit out of scope of the public forums, but if there are any specific questions about functionality or bugs/inconsistencies that you see, let me know.

    Best Regards,
    Alec