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.

AWRL6432BOOST: Interference Interpolation example for xWRL6432

Part Number: AWRL6432BOOST
Other Parts Discussed in Thread: AWRL6432

Tool/software:

Hello TI experts,

xWRL6432 is using HWA1.2.

HWA1.2 has Zero-out feature for interference. As I checked, HWA2.0 has more features for interference like interpolation.

Is there any method to apply Interference interpolation to xWRL6432?

or any example for xWRL6432?

Thank you.

Best Regards,

JB

  • Hi, JB:

    Are you looking for zero-out based interference mitigation to xWRL6432?   

    Best,

    Zigang

  • Hi, Zigang 

    I'm looking for linear interpolation based interference mitigation to xWRL6432.

    HWA1.2 supports only zeroing-out.

    HWA2.0 supports zeroing-out, zeroing-out with window, linear interpolation.

    Is it possible to apply linear interpolation to xWRL6432? Is there any example or reference?

    Thank you.

    Best Regards,

    JB

  • JB:

    Let me do some research and get back to you early next week.

    Best,

    Zigang

  • Hi, Zigang

    Please. Thank you for help.

    Best Regards,

    JB

  • Hi, JB:

    There is no way we can use the HWA 2.0 in the device that has HWA 1.2.   If you can consider different device, let me know.

    I will check further to see whether there is any previous example in software to implement interference mitigation.  I will get back to you once I found the answer.

    Best,

    Zigang

  • Hi, JB:

    We have a software based implementation inside radar toolbox, located at: https://dev.ti.com/tirex/explore/node?node=A__AbYPV7C2tpFJ0YJLq--B2A__radar_toolbox__1AslXXD__LATEST

    However, this is a DSP-based implementation.   

    Best,

    Zigang

  • Hi, Zigang

    Thank you for findings.

    .

    I started implementation by referring to the above example.

    I have a question about adding transferCompletionCallbackFxn.

    When using DPEDMA_syncABCfg parameter and DPEDMA_configSyncAB function,

    transferCompletionCallbackFxn can be used like this.(Interference mitigation example code in toolbox)

    .

    Below code is xWRL6432 mmw_demo, ADC data input code from ADC buffer to HWA memory.

    /**
     *  @b Description
     *  @n
     *      EDMA configuration for rangeProc data in when EDMA is used to copy data from 
     *  ADCBuf to HWA memory
     *
     *  @param[in]  rangeProcObj              Pointer to rangeProc object handle
     *  @param[in]  pHwConfig                 Pointer to rangeProc hardware resources
     *
     *  \ingroup    DPU_RANGEPROC_INTERNAL_FUNCTION
     *
     *  @retval
     *      Success     - 0
     *  @retval
     *      Error       - <0
     */
    static int32_t rangeProcHWA_ConfigEDMA_DataIn
    (
        rangeProcHWAObj         *rangeProcObj,
        DPU_RangeProcHWA_HW_Resources *pHwConfig
    )
    {
        int32_t             errorCode = SystemP_SUCCESS;
        bool                retVal;
        EDMA_Handle         handle = rangeProcObj->edmaHandle;
        uint16_t            bytePerRxChan;
        rangeProc_dpParams  *DPParams= &rangeProcObj->params;
        uint32_t            dmaCh, tcc, param, chType;
        bool                isEventTriggered;
        int32_t             idx, numParamSets;
        uint32_t            hwaInpBuff[2];
        uint32_t            baseAddr, regionId;
        EDMACCPaRAMEntry    shadowParam; //paramCfg
        uint32_t            linkChId0, linkChId1;
        
        baseAddr = EDMA_getBaseAddr(handle);
        DebugP_assert(baseAddr != 0);
    
        regionId = EDMA_getRegionId(handle);
        DebugP_assert(regionId < SOC_EDMA_NUM_REGIONS);
    
        /* Get rangeProc Configuration */
        handle = rangeProcObj->edmaHandle;
        chType = EDMA_CHANNEL_TYPE_DMA;
        dmaCh  = pHwConfig->edmaInCfg.dataIn.channel;
        param  = pHwConfig->edmaInCfg.dataIn.channel;
        tcc    = pHwConfig->edmaInCfg.dataInSignature.channel;
        isEventTriggered = true;
    
        /* Config Dummy channel and paramset */
        errorCode = DPEDMA_configDummyChannel(handle, chType, &dmaCh, &tcc, &param);
    
        if (errorCode != SystemP_SUCCESS)
        {
            goto exit;
        }
    
        //real ADC samples only supported
        bytePerRxChan = DPParams->numAdcSamples * DPParams->numRxAntennas * sizeof(uint16_t);
        
        numParamSets = 2; /* ping and pong path */
        hwaInpBuff[0] = rangeProcObj->hwaMemBankAddr[0];
        hwaInpBuff[1] = rangeProcObj->hwaMemBankAddr[1];
    
        /* Get LinkChan from configuraiton */
        linkChId0 = pHwConfig->edmaInCfg.dataIn.channelShadow[0];
        allocateEDMAShadowChannel(handle, &linkChId0);
        linkChId1 = pHwConfig->edmaInCfg.dataIn.channelShadow[1];
        allocateEDMAShadowChannel(handle, &linkChId1);
    
        /* Program Shadow Param Sets */
        EDMACCPaRAMEntry_init(&shadowParam);
    
        for (idx = 0; idx < numParamSets; idx++)
        {
            memset(&shadowParam, 0, sizeof(EDMACCPaRAMEntry));
            shadowParam.srcAddr = (uint32_t) SOC_virtToPhy(rangeProcObj->ADCdataBuf);
            if (rangeProcObj->params.numDopplerChirpsPerFrame > 1)
            {
                shadowParam.destAddr = (uint32_t) hwaInpBuff[idx];
            }
            else
            {
                shadowParam.destAddr = (uint32_t) hwaInpBuff[0];
            }
            shadowParam.aCnt = bytePerRxChan;
            shadowParam.bCnt = 1;
            shadowParam.cCnt = DPParams->numTxAntennas; /* ADC ping/pong, (two chirps) */
            shadowParam.bCntReload = shadowParam.bCnt;
            shadowParam.srcBIdx = 0;
            shadowParam.destBIdx = 0;
            shadowParam.srcCIdx = 0;
            shadowParam.destCIdx = (uint32_t)rangeProcObj->rxChanOffset * DPParams->numRxAntennas;
    
            shadowParam.opt          |=
                (EDMA_OPT_TCCHEN_MASK |
                 ((((uint32_t)tcc) << EDMA_OPT_TCC_SHIFT) & EDMA_OPT_TCC_MASK) |
                 ((((uint32_t)EDMA_SYNC_AB) << EDMA_OPT_SYNCDIM_SHIFT) & EDMA_OPT_SYNCDIM_MASK));
    
            EDMASetPaRAM(baseAddr, pHwConfig->edmaInCfg.dataIn.channelShadow[idx], 
                            &shadowParam);
            
        }
    
        /* Link 2 shadow Param sets */
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              param,
                                              linkChId0)) != SystemP_SUCCESS)
        {
            goto exit;
        }
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              linkChId0,
                                              linkChId1)) != SystemP_SUCCESS)
        {
            goto exit;
        }
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              linkChId1,
                                              linkChId0)) != SystemP_SUCCESS)
        {
            goto exit;
        }
    
    
        /* Bring in the first shadow param set  */
        retVal = EDMAEnableTransferRegion(baseAddr, regionId, dmaCh, EDMA_TRIG_MODE_MANUAL);
        
        if(isEventTriggered)
        {
            retVal = EDMAEnableTransferRegion(baseAddr, regionId, dmaCh, EDMA_TRIG_MODE_EVENT);
        }
    
        if (retVal != TRUE)
        {
            errorCode = DPU_RANGEPROCHWA_EINTERNAL;
            goto exit;
        }
    
        /*************************************************/
        /* Generate Hot Signature to trigger Ping/Pong paramset   */
        /*************************************************/
        if (rangeProcObj->params.numDopplerChirpsPerFrame > 1)
        {
            errorCode = DPEDMAHWA_configTwoHotSignature(handle,
                                                      &pHwConfig->edmaInCfg.dataInSignature,
                                                      rangeProcObj->initParms.hwaHandle,
                                                      rangeProcObj->dataInTrigger[0],
                                                      rangeProcObj->dataInTrigger[1],
                                                      false);
        }
        else
        {
            errorCode = DPEDMAHWA_configTwoHotSignature(handle,
                                                      &pHwConfig->edmaInCfg.dataInSignature,
                                                      rangeProcObj->initParms.hwaHandle,
                                                      rangeProcObj->dataInTrigger[0],
                                                      rangeProcObj->dataInTrigger[0],
                                                      false);
        }
    
        if (errorCode != SystemP_SUCCESS)
        {
            goto exit;
        }
    exit:
        return(errorCode);
    }

    How to add transferCompletionCallbackFxn in this EDMA transfer structure?

    If I need to use transferCompletionCallbackFxn, should I change the structure to use DPEDMA_syncABCfg, DPEDMA_configSyncAB functions?

    Thank you.

    Best Regards,

    JB

  • Hi, Zigang

    .

    I have some questions for implementation.

    1. Is it possible to implement the structure of that example in xWRL6432?

    That example, 

    ADC buffer (ping and pong) -> (EDMA IN) -> ADC data in local memory -> (EDMA PIPE) -> HWA memory

    mmw_demo(xWRL6432),

    ADC buffer (ping and pong) x 2 -> (EDMA) -> HWA memory 

    'ADC buffer (ping and pong) x 2' using  the for loop causes confusion to set EDMA channel, function, chaining, etc  for me.

    .

    2.How to use transferCompletionCallbackFxn in xWRL6432 ADC dataIn EDMA structure?

    Is there any function or API for it?

    Please check above question from a few days ago.

    .

    3.  About EDMA channel

    To implement the data pipe structure of the example, The EDMA channels are more needed.

    Do I use some defined but unused channel in mmw_res.h? EDMA_APPSS_TPCC_B_EVT_FREE_XX?

    or Should be set something for using channels for data pipe?

    Thank you.

    Best Regards,

    JB

  • Hi, JB:

    For HWA and EDMA related question.  Please continue the discussion on the following e2e

    (6) AWRL6432BOOST: Interchirp processing - Sensors forum - Sensors - TI E2E support forums

    Best,

    Zigang

  • Hi, Zigang

    That e2e has been locked over time. The reply button seems to have disappeared.

    Could you open that e2e? or continue the discussion in this e2e?

    Thank you.

    Best Regards,

    JB

  • Hi, JB:

    I have asked the e2e owner to open it for you.

    Best,

    Zigang

  • Hi, Zigang

    It hasn't opened yet. Could you please check it?

    Thank you.

    Best Regards,

    JB

  • Hi, JB:

    Our EDMA/HWA expert is out for vacation and will come back at the end of next week. 

    Best,

    Zigang

  • Hi, Zigang

    Could you please check that e2e will be opened if expert come back?

    Thank you.

    Best Regards,

    JB

  • HI, JB:

    I just sent another message to our expert.  

    Best,

    Zigang

  • Hi,

    Is the thread still locked?

    Thank you
    Cesar

  • Hi, Cesar

    I mis clicked resolve button.

    Yes. It is still locked.

    Could you reply for my questions in this e2e?

    Thank you. 

    Best Regards,

    JB

  • Hi, Cesar

    Could you please reply for my questions in this e2e? 

    or Could you check my questions first? I will re-upload questions when that e2e will be opened.

    .

    History

    - I'd like to implement Linear Interpolation of Interference Mitigation to AWRL6432. 

    - There is a example in toolbox but it's for xwr18/16xx device (https://dev.ti.com/tirex/explore/node?node=A__AbYPV7C2tpFJ0YJLq--B2A__radar_toolbox__1AslXXD__LATEST)

    - Implementing this example into AWRL6432, requires EDMA additions and changes.

    .

    Q1. Is it possible to implement the structure of that x18/16xx example in xWRL6432?

    That xwr18/16xx example, 

    ADC buffer (ping and pong) -> (EDMA IN) -> ADC data in local memory -> (EDMA PIPE) -> HWA memory

    mmw_demo(xWRL6432),

    ADC buffer (ping and pong) x 2 -> (EDMA) -> HWA memory 

    'ADC buffer (ping and pong) x 2' using  the for loop causes confusion to set EDMA channel, function, chaining, etc  for me.

    .

    .

    Q2. How to use transferCompletionCallbackFxn in xWRL6432 ADC dataIn EDMA structure?

    I have a question about adding transferCompletionCallbackFxn.

    When using DPEDMA_syncABCfg parameter and DPEDMA_configSyncAB function,

    transferCompletionCallbackFxn can be used like this.(xwr18/16xx Interference mitigation example code in toolbox)

    .

    Below code is xWRL6432 mmw_demo, ADC data input code from ADC buffer to HWA memory.

    I couldn't find any API for it. How to add transferCompletionCallbackFxn in this EDMA transfer structure? 

    /**
     *  @b Description
     *  @n
     *      EDMA configuration for rangeProc data in when EDMA is used to copy data from 
     *  ADCBuf to HWA memory
     *
     *  @param[in]  rangeProcObj              Pointer to rangeProc object handle
     *  @param[in]  pHwConfig                 Pointer to rangeProc hardware resources
     *
     *  \ingroup    DPU_RANGEPROC_INTERNAL_FUNCTION
     *
     *  @retval
     *      Success     - 0
     *  @retval
     *      Error       - <0
     */
    static int32_t rangeProcHWA_ConfigEDMA_DataIn
    (
        rangeProcHWAObj         *rangeProcObj,
        DPU_RangeProcHWA_HW_Resources *pHwConfig
    )
    {
        int32_t             errorCode = SystemP_SUCCESS;
        bool                retVal;
        EDMA_Handle         handle = rangeProcObj->edmaHandle;
        uint16_t            bytePerRxChan;
        rangeProc_dpParams  *DPParams= &rangeProcObj->params;
        uint32_t            dmaCh, tcc, param, chType;
        bool                isEventTriggered;
        int32_t             idx, numParamSets;
        uint32_t            hwaInpBuff[2];
        uint32_t            baseAddr, regionId;
        EDMACCPaRAMEntry    shadowParam; //paramCfg
        uint32_t            linkChId0, linkChId1;
        
        baseAddr = EDMA_getBaseAddr(handle);
        DebugP_assert(baseAddr != 0);
    
        regionId = EDMA_getRegionId(handle);
        DebugP_assert(regionId < SOC_EDMA_NUM_REGIONS);
    
        /* Get rangeProc Configuration */
        handle = rangeProcObj->edmaHandle;
        chType = EDMA_CHANNEL_TYPE_DMA;
        dmaCh  = pHwConfig->edmaInCfg.dataIn.channel;
        param  = pHwConfig->edmaInCfg.dataIn.channel;
        tcc    = pHwConfig->edmaInCfg.dataInSignature.channel;
        isEventTriggered = true;
    
        /* Config Dummy channel and paramset */
        errorCode = DPEDMA_configDummyChannel(handle, chType, &dmaCh, &tcc, &param);
    
        if (errorCode != SystemP_SUCCESS)
        {
            goto exit;
        }
    
        //real ADC samples only supported
        bytePerRxChan = DPParams->numAdcSamples * DPParams->numRxAntennas * sizeof(uint16_t);
        
        numParamSets = 2; /* ping and pong path */
        hwaInpBuff[0] = rangeProcObj->hwaMemBankAddr[0];
        hwaInpBuff[1] = rangeProcObj->hwaMemBankAddr[1];
    
        /* Get LinkChan from configuraiton */
        linkChId0 = pHwConfig->edmaInCfg.dataIn.channelShadow[0];
        allocateEDMAShadowChannel(handle, &linkChId0);
        linkChId1 = pHwConfig->edmaInCfg.dataIn.channelShadow[1];
        allocateEDMAShadowChannel(handle, &linkChId1);
    
        /* Program Shadow Param Sets */
        EDMACCPaRAMEntry_init(&shadowParam);
    
        for (idx = 0; idx < numParamSets; idx++)
        {
            memset(&shadowParam, 0, sizeof(EDMACCPaRAMEntry));
            shadowParam.srcAddr = (uint32_t) SOC_virtToPhy(rangeProcObj->ADCdataBuf);
            if (rangeProcObj->params.numDopplerChirpsPerFrame > 1)
            {
                shadowParam.destAddr = (uint32_t) hwaInpBuff[idx];
            }
            else
            {
                shadowParam.destAddr = (uint32_t) hwaInpBuff[0];
            }
            shadowParam.aCnt = bytePerRxChan;
            shadowParam.bCnt = 1;
            shadowParam.cCnt = DPParams->numTxAntennas; /* ADC ping/pong, (two chirps) */
            shadowParam.bCntReload = shadowParam.bCnt;
            shadowParam.srcBIdx = 0;
            shadowParam.destBIdx = 0;
            shadowParam.srcCIdx = 0;
            shadowParam.destCIdx = (uint32_t)rangeProcObj->rxChanOffset * DPParams->numRxAntennas;
    
            shadowParam.opt          |=
                (EDMA_OPT_TCCHEN_MASK |
                 ((((uint32_t)tcc) << EDMA_OPT_TCC_SHIFT) & EDMA_OPT_TCC_MASK) |
                 ((((uint32_t)EDMA_SYNC_AB) << EDMA_OPT_SYNCDIM_SHIFT) & EDMA_OPT_SYNCDIM_MASK));
    
            EDMASetPaRAM(baseAddr, pHwConfig->edmaInCfg.dataIn.channelShadow[idx], 
                            &shadowParam);
            
        }
    
        /* Link 2 shadow Param sets */
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              param,
                                              linkChId0)) != SystemP_SUCCESS)
        {
            goto exit;
        }
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              linkChId0,
                                              linkChId1)) != SystemP_SUCCESS)
        {
            goto exit;
        }
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              linkChId1,
                                              linkChId0)) != SystemP_SUCCESS)
        {
            goto exit;
        }
    
    
        /* Bring in the first shadow param set  */
        retVal = EDMAEnableTransferRegion(baseAddr, regionId, dmaCh, EDMA_TRIG_MODE_MANUAL);
        
        if(isEventTriggered)
        {
            retVal = EDMAEnableTransferRegion(baseAddr, regionId, dmaCh, EDMA_TRIG_MODE_EVENT);
        }
    
        if (retVal != TRUE)
        {
            errorCode = DPU_RANGEPROCHWA_EINTERNAL;
            goto exit;
        }
    
        /*************************************************/
        /* Generate Hot Signature to trigger Ping/Pong paramset   */
        /*************************************************/
        if (rangeProcObj->params.numDopplerChirpsPerFrame > 1)
        {
            errorCode = DPEDMAHWA_configTwoHotSignature(handle,
                                                      &pHwConfig->edmaInCfg.dataInSignature,
                                                      rangeProcObj->initParms.hwaHandle,
                                                      rangeProcObj->dataInTrigger[0],
                                                      rangeProcObj->dataInTrigger[1],
                                                      false);
        }
        else
        {
            errorCode = DPEDMAHWA_configTwoHotSignature(handle,
                                                      &pHwConfig->edmaInCfg.dataInSignature,
                                                      rangeProcObj->initParms.hwaHandle,
                                                      rangeProcObj->dataInTrigger[0],
                                                      rangeProcObj->dataInTrigger[0],
                                                      false);
        }
    
        if (errorCode != SystemP_SUCCESS)
        {
            goto exit;
        }
    exit:
        return(errorCode);
    }

    .

    .

    Q3. About EDMA channel

    To implement the data pipe structure of the example, The EDMA channels are more needed.

    Do I use some defined but unused channel in mmw_res.h? EDMA_APPSS_TPCC_B_EVT_FREE_XX?

    or Should be set something for using channels for data pipe?

    .

    .

    Sorry for code level questions, I tried several implementations, but the data was not transferred properly.

    Thank you.

    Best Regards,

    JB

  • Hi, Zigang

    Could you check status of the thread?

    That E2E is still locked.

    It's been over 3 weeks since I posted the questions...

    Do I wait in this e2e for Cesar's answer?

    .

    Thank you for help.

    Best Regards,

    JB

  • HI, JB:

    Since the other e2e thread is somehow marked as resolved. Cesar can not unlock it.  I have just assigned this e2e to Cesar so that he can see your reply now and continue the discussion.   Thank you for your patient.

    Best,

    Zigang

  • Hi, Cesar

    I just reply for the questions again since you were assigned this E2E.

    .

    History

    - I'd like to implement Linear Interpolation of Interference Mitigation to AWRL6432. 

    - There is a example in toolbox but it's for xwr18/16xx device (https://dev.ti.com/tirex/explore/node?node=A__AbYPV7C2tpFJ0YJLq--B2A__radar_toolbox__1AslXXD__LATEST)

    - Implementing this example into AWRL6432, requires EDMA additions and changes.

    .

    Q1. Is it possible to implement the structure of that x18/16xx example in xWRL6432?

    That xwr18/16xx example, 

    ADC buffer (ping and pong) -> (EDMA IN) -> ADC data in local memory -> (EDMA PIPE) -> HWA memory

    mmw_demo(xWRL6432),

    ADC buffer (ping and pong) x 2 -> (EDMA) -> HWA memory 

    'ADC buffer (ping and pong) x 2' using  the for loop causes confusion to set EDMA channel, function, chaining, etc  for me.

    .

    .

    Q2. How to use transferCompletionCallbackFxn in xWRL6432 ADC dataIn EDMA structure?

    I have a question about adding transferCompletionCallbackFxn.

    When using DPEDMA_syncABCfg parameter and DPEDMA_configSyncAB function,

    transferCompletionCallbackFxn can be used like this.(xwr18/16xx Interference mitigation example code in toolbox)

    .

    Below code is xWRL6432 mmw_demo, ADC data input code from ADC buffer to HWA memory.

    I couldn't find any API for it. How to add transferCompletionCallbackFxn in this EDMA transfer structure? 

    /**
     *  @b Description
     *  @n
     *      EDMA configuration for rangeProc data in when EDMA is used to copy data from 
     *  ADCBuf to HWA memory
     *
     *  @param[in]  rangeProcObj              Pointer to rangeProc object handle
     *  @param[in]  pHwConfig                 Pointer to rangeProc hardware resources
     *
     *  \ingroup    DPU_RANGEPROC_INTERNAL_FUNCTION
     *
     *  @retval
     *      Success     - 0
     *  @retval
     *      Error       - <0
     */
    static int32_t rangeProcHWA_ConfigEDMA_DataIn
    (
        rangeProcHWAObj         *rangeProcObj,
        DPU_RangeProcHWA_HW_Resources *pHwConfig
    )
    {
        int32_t             errorCode = SystemP_SUCCESS;
        bool                retVal;
        EDMA_Handle         handle = rangeProcObj->edmaHandle;
        uint16_t            bytePerRxChan;
        rangeProc_dpParams  *DPParams= &rangeProcObj->params;
        uint32_t            dmaCh, tcc, param, chType;
        bool                isEventTriggered;
        int32_t             idx, numParamSets;
        uint32_t            hwaInpBuff[2];
        uint32_t            baseAddr, regionId;
        EDMACCPaRAMEntry    shadowParam; //paramCfg
        uint32_t            linkChId0, linkChId1;
        
        baseAddr = EDMA_getBaseAddr(handle);
        DebugP_assert(baseAddr != 0);
    
        regionId = EDMA_getRegionId(handle);
        DebugP_assert(regionId < SOC_EDMA_NUM_REGIONS);
    
        /* Get rangeProc Configuration */
        handle = rangeProcObj->edmaHandle;
        chType = EDMA_CHANNEL_TYPE_DMA;
        dmaCh  = pHwConfig->edmaInCfg.dataIn.channel;
        param  = pHwConfig->edmaInCfg.dataIn.channel;
        tcc    = pHwConfig->edmaInCfg.dataInSignature.channel;
        isEventTriggered = true;
    
        /* Config Dummy channel and paramset */
        errorCode = DPEDMA_configDummyChannel(handle, chType, &dmaCh, &tcc, &param);
    
        if (errorCode != SystemP_SUCCESS)
        {
            goto exit;
        }
    
        //real ADC samples only supported
        bytePerRxChan = DPParams->numAdcSamples * DPParams->numRxAntennas * sizeof(uint16_t);
        
        numParamSets = 2; /* ping and pong path */
        hwaInpBuff[0] = rangeProcObj->hwaMemBankAddr[0];
        hwaInpBuff[1] = rangeProcObj->hwaMemBankAddr[1];
    
        /* Get LinkChan from configuraiton */
        linkChId0 = pHwConfig->edmaInCfg.dataIn.channelShadow[0];
        allocateEDMAShadowChannel(handle, &linkChId0);
        linkChId1 = pHwConfig->edmaInCfg.dataIn.channelShadow[1];
        allocateEDMAShadowChannel(handle, &linkChId1);
    
        /* Program Shadow Param Sets */
        EDMACCPaRAMEntry_init(&shadowParam);
    
        for (idx = 0; idx < numParamSets; idx++)
        {
            memset(&shadowParam, 0, sizeof(EDMACCPaRAMEntry));
            shadowParam.srcAddr = (uint32_t) SOC_virtToPhy(rangeProcObj->ADCdataBuf);
            if (rangeProcObj->params.numDopplerChirpsPerFrame > 1)
            {
                shadowParam.destAddr = (uint32_t) hwaInpBuff[idx];
            }
            else
            {
                shadowParam.destAddr = (uint32_t) hwaInpBuff[0];
            }
            shadowParam.aCnt = bytePerRxChan;
            shadowParam.bCnt = 1;
            shadowParam.cCnt = DPParams->numTxAntennas; /* ADC ping/pong, (two chirps) */
            shadowParam.bCntReload = shadowParam.bCnt;
            shadowParam.srcBIdx = 0;
            shadowParam.destBIdx = 0;
            shadowParam.srcCIdx = 0;
            shadowParam.destCIdx = (uint32_t)rangeProcObj->rxChanOffset * DPParams->numRxAntennas;
    
            shadowParam.opt          |=
                (EDMA_OPT_TCCHEN_MASK |
                 ((((uint32_t)tcc) << EDMA_OPT_TCC_SHIFT) & EDMA_OPT_TCC_MASK) |
                 ((((uint32_t)EDMA_SYNC_AB) << EDMA_OPT_SYNCDIM_SHIFT) & EDMA_OPT_SYNCDIM_MASK));
    
            EDMASetPaRAM(baseAddr, pHwConfig->edmaInCfg.dataIn.channelShadow[idx], 
                            &shadowParam);
            
        }
    
        /* Link 2 shadow Param sets */
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              param,
                                              linkChId0)) != SystemP_SUCCESS)
        {
            goto exit;
        }
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              linkChId0,
                                              linkChId1)) != SystemP_SUCCESS)
        {
            goto exit;
        }
        if ((errorCode = DPEDMA_linkParamSets(handle,
                                              linkChId1,
                                              linkChId0)) != SystemP_SUCCESS)
        {
            goto exit;
        }
    
    
        /* Bring in the first shadow param set  */
        retVal = EDMAEnableTransferRegion(baseAddr, regionId, dmaCh, EDMA_TRIG_MODE_MANUAL);
        
        if(isEventTriggered)
        {
            retVal = EDMAEnableTransferRegion(baseAddr, regionId, dmaCh, EDMA_TRIG_MODE_EVENT);
        }
    
        if (retVal != TRUE)
        {
            errorCode = DPU_RANGEPROCHWA_EINTERNAL;
            goto exit;
        }
    
        /*************************************************/
        /* Generate Hot Signature to trigger Ping/Pong paramset   */
        /*************************************************/
        if (rangeProcObj->params.numDopplerChirpsPerFrame > 1)
        {
            errorCode = DPEDMAHWA_configTwoHotSignature(handle,
                                                      &pHwConfig->edmaInCfg.dataInSignature,
                                                      rangeProcObj->initParms.hwaHandle,
                                                      rangeProcObj->dataInTrigger[0],
                                                      rangeProcObj->dataInTrigger[1],
                                                      false);
        }
        else
        {
            errorCode = DPEDMAHWA_configTwoHotSignature(handle,
                                                      &pHwConfig->edmaInCfg.dataInSignature,
                                                      rangeProcObj->initParms.hwaHandle,
                                                      rangeProcObj->dataInTrigger[0],
                                                      rangeProcObj->dataInTrigger[0],
                                                      false);
        }
    
        if (errorCode != SystemP_SUCCESS)
        {
            goto exit;
        }
    exit:
        return(errorCode);
    }

    .

    .

    Q3. About EDMA channel

    To implement the data pipe structure of the example, The EDMA channels are more needed.

    Do I use some defined but unused channel in mmw_res.h? EDMA_APPSS_TPCC_B_EVT_FREE_XX?

    or Should be set something for using channels for data pipe?

    .

    .

    Sorry for code level questions, I tried several implementations, but the data was not transferred properly.

    Thank you.

    Best Regards,

    JB

  • Hi,

    Q1. Is it possible to implement the structure of that x18/16xx example in xWRL6432?

    Theoretically this is possible. However this will increase the chirp processing time required. 

    Before you start implementing this you need to make sure that there will be sufficient time to support this feature.

    The duration of 1D FFT processing with HWA can be estimated based on the number of ADC samples. Please see the HWA chapter in TRM for more information.

    Only after you are sure that you will have sufficient time for additional processing you should proceed to implementation analysis.

    The first step of implementation analysis is to create a block diagram that shows the EDMA transfers. This block diagram should show all the EDMA channels used (for Ping/Pong Linking, Chaining...)

    For each EDMA transfer, you will need to understand what type of Sync is being used, which interrupts are enabled, how are the transfers triggered...

    Only after you understand this in detail, you should move on at code implementation

    Q2. How to use transferCompletionCallbackFxn in xWRL6432 ADC dataIn EDMA structure?

    This question is related to code implementation. As mentioned above you should only be concerned about implementation after you have completed the implementation analysis

    You can look at "rangeProcHWA_ConfigEDMA_DataOut" for an example on how to add  transferCompletionCallbackFxn

    Q3. About EDMA channel

    You are correct. You will need to use new EDMA channels that are not being used by the demo.

    Thank you

    Cesar

  • Hi, Cesar

    Thank you for reply and I have additional question.

    .

    Q1. Is it possible to implement the structure of that xwr18/16xx example in xWRL6432?

    => I'm checking it.

    .

    Q2. How to use transferCompletionCallbackFxn in xWRL6432 ADC dataIn EDMA structure?

    This question is related to code implementation. As mentioned above you should only be concerned about implementation after you have completed the implementation analysis

    You can look at "rangeProcHWA_ConfigEDMA_DataOut" for an example on how to add  transferCompletionCallbackFxn

    => rangeProcHWA_ConfigEDMA_DataIn of xwr18/16xx and rangeProcHWA_ConfigEDMA_DataOut of AWRL6432 are using 'DPEDMA_configSyncAB' utility function for transfer and it includes transferCompletionCallbackFxn.

    .

    But, rangeProcHWA_ConfigEDMA_DataIn of AWRL6432 is not using that function.

    How to implement transferCompletionCallbackFxn in AWRL6432 EDMA_DataIn strucnture?

    Is there function or parameter for it? I couldn't find it.

    .
    Thank you.
    Best Regards,
    JB
  • Hi,

    Your observation is correct. The default rangeProcHWA_ConfigEDMA_DataIn does not initialize a CallbackFxn because it does not need one.

    This is the reason you need to write a new function that you could call rangeProcHWA_ConfigEDMA_DataIn_Interference. This function will be similar to rangeProcHWA_ConfigEDMA_DataIn, however you will also add in this function the initialization of the Callback Fxn in the same way as it is done in "rangeProcHWA_ConfigEDMA_DataOut".

    Thank you

    Cesar

  • Hi, Cesar

    Thank you for kind reply and I have a question while implementing it.

    .

    Q. Do I have to use the DPEDMA_configSyncAB function unconditionally to use the CallbackFxn?

    Is it not possible to add the CallbackFxn to the EDMA transfer structure of the current AWRL6432 _DataIn function? (Current AWRL6432 _DataIn function is not using DPEDMA_configSyncAB function)

    .

    Please let me know If I have wrong understanding.

    As I know, each EDMA transfer requires its own EDMA channel.

    In rangeProcHWA_ConfigEDMA_DataOut,

    two EDMA transfers are performed, each channel transfers input data from different addresses.

    .

    However, in the rangeProcHWA_ConfigEDMA_DataIn function, in order to use DPEDMA_configSyncAB, two different channels are required for ADC -> HWA memory transfer,

    but the CHIP_AVAIL_IRQ channel should be used for ADC input data.

    Only one CHIP_AVAIL_IRQ channel for ADC transfer is defined by the HWASS TPCC_B event map.

    When I create two channels to use the DPEDMA_configSyncAB function and input CHIP_AVAIL_IRQ at the same time, I get an error.

    .

    Thank you.

    Best Regards,

    JB

  • Hi,

    You are correct. Each EDMA transfer requires an EDMA channel.

    Also, each EDMA channel must be configured with either SyncA or SyncAB.

    The EDMA3 training shows that EVERY EDMA transfer can trigger an Interrupt when the transfer is complete. This is independent of SyncA or SyncAB configuration. 

    I will provide more information next week

    thank you
    Cesar

  • Hi, Cesar

    .

    Could you check my understanding and question?

    .

    * In the current AWRL6432 and xwr18xx/16xx interference mitigation example,
    - xwr18/16xx : one adc buffer transfer,         use DPEDMA_configSyncAB, Channel - CHIRP_AVAIL_IRQ
    - AWRL6432 : Two adc buffer transfer, Not use DPEDMA_configSyncAB, Channel - CHIRP_AVAIL_IRQ (defined HWASS TPCC_B Event Map)

    .
    To implement following xwr18/16xx example,
    .
    1. AWRL6432 ADC buffer transfer structure is not using DPEDMA_configSyncAB.
    If not using DPEDMA_configSyncAB, there is no way to use CallbackFxn in it's structure.
    So it should be changed to use DPEDMA_configSyncAB function for using CallbackFxn.
    Q1. Is it correct understanding?

    .
    .
    2. There is Two ADC buffer transfers in AWRL6432. it is different with xwr18/16xx. So DPEDMA_configSyncAB function should be used two times. and Transfer channel also should be two.
    But, for ADC buffer transfer, CHIRP_AVAIL_IRQ channel should be used.
    In here, each channel cannot set CHIRP_AVAIL_IRQ at the same time. if two channels have same channel, it occurs error.

    .
    I think this is blocking point in AWRL6432 code to change.
    Q2. How should I implement this in this state? Is it possible to change to use DPEDMA_configSyncAB function?

    .

    Thank you.

    Best Regards,

    JB

  • Hi,

    I have created a block diagram of the system to help with the discussion. At this point there is no need to implement ping/pong, let's consider only one buffer (ping)

    You can use SyncAB as shown in the diagram

    thank you
    Cesar

  • Hi, Cesar

    .

    Thank you very much for taking the time to create the block diagram.

    One ADC buffer has ping/pong. I think ping/pong is not matter. The matter is Two ADC buffer transfer in AWRL6432.

    If you check the code, rangeProcHWA_ConfigEDMA_DataIn function in AWRL6432,

    The two ADC buffers are transferred through a for loop.


    Could you check my understanding and question?

    To implement following xwr18/16xx example,
    .
    1. AWRL6432 ADC buffer transfer structure is not using DPEDMA_configSyncAB.

    If not using DPEDMA_configSyncAB, there is no way to use CallbackFxn in it's structure.

    So it should be changed to use DPEDMA_configSyncAB function for using CallbackFxn.

    Q1. Is it correct understanding?

    .
    .
    2. There is Two ADC buffer transfers in AWRL6432. it is different with xwr18/16xx. So DPEDMA_configSyncAB function should be used two times. and Transfer channel also should be two.

    But, for ADC buffer transfer, CHIRP_AVAIL_IRQ channel should be used.

    In here, each channel cannot set CHIRP_AVAIL_IRQ at the same time. if two channels have same channel, it occurs error.

    .
    I think this is blocking point in AWRL6432 code to change.

    Q2. How should I implement this in this state? Is it possible to change to use DPEDMA_configSyncAB function?
    .

    .

    Thank you.

    Best Regards,

    JB

  • Hi,

    I think we should use only one channel for EDMA_Interf_IN. This can be configured as SyncAB if you want.

    Since we are only doing one transfer at a time, we can also configure with SyncA since there is no difference. in the transfer performed.

    As you can see "DPEDMA_configSyncA()" can also be used and includes a callBackFxn initialization

    thank you
    Cesar

  • Hi, Cesar

    .

    Two ADC buffer transfer is AWRL6432 design concept.

    I think there is some risk in changing the original architecture.

    That's why I asked if the xwr18/16xx example is possible to implement in the current AWRL6432 structure.

    .

    - AWRL6432 is two ADC buffer transfer architecturally.

    - For using CallbackFxn, EDMA structure should be changed to use DPEDMA_configSyncAB function.

    - but for using DPEDMA_configSyncAB function, two transfers are required two different channel, but channel should be CHIRP_AVAIL_IRQ for ADC buffer. it occur error.

    Is that xwr18/16xx example suitable for AWRL6432? 

    .

    Thank you.

    Best Regards,

    JB

  • AWRL6432 is two ADC buffer transfer architecturally.

    This is correct. This was designed to connect the ADC buffer directly to the HWA. However if we perform ARM processing before HWA processing, as in the interference interpolation example, the system is less efficient. Because we are limited by the ARM processing. So, using ping/pong buffers only helps with the transfer from ADC Buffer to ARM memory. 

    So, when I suggested using NO ping/pong, I was thinking about simplifying the implementation as a first phase. Then, as a second phase, ping/pong can be added to improve a little bit the performance.

    Is that xwr18/16xx example suitable for AWRL6432? 

    The xwr18/16xx is CONCEPTUALLY suitable for AWRL6432, BUT one needs to understand the changes that need to be made. If we just copy the code, this will not work. 

    We need to start with the AWRL6432 code and modify it for this use case

    thank you

    Cesar

  • Hi, Cesar

    .

    Yes, Just copy is not possible because architecture is different.

    I'm confusing. I think ping/pong of ADC buffer is not matter.

    The matter is Two transfer of ADC buffer of AWRL6432.

    xwr18/16xx has just one transfer of ADC buffer.

    - ping/pong of ADC buffer and ping/pong of HWA memory are different.

    .

    In xwr18/16xx,

    One ADC buffer(ping+pong) transfer to HWA memory. and

    Ping of ADC buffer transfer to HWA ping memory,

    Pong of ADC buffer transfer to HWA pong memory.

    .

    but In AWRL6432,

    Two ADC buffer transfer to HWA memory. and

    One ADC buffer(ping+pong) transfer to HWA ping memory,

    The other ADC buffer(ping+pong) transfer to HWA pong memory.

    .

    This is main difference.

    So for using CallbackFxn, should be used DPEDMA_configSyncAB function.

    But for using DPEDMA_configSyncAB function, two transfers are required two different channel, but channel should be CHIRP_AVAIL_IRQ for ADC buffer. it occur error.

    .

    Your meaning is, I should change 2 ADC buffer transfer of AWRL6432 architecture to 1 ADC buffer transfer like xwr18/16xx. right?

    .

    Thank you. 

    Best Regards,

    JB

  • Yes,

    I was thinking not using ping/pong. Just a single transfer. This is simpler and will help you better understand the EDMA transfer

    thank you
    Cesar