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.

IWR1443: ADC data to L3

Part Number: IWR1443

Hi,

I would like to get ADC raw data to L3.

ADC buffer is inaccessible for user.

After MMWave_start ADC data always goes to ACCEL_MEM0 and ACCEL_MEM2 acroding ping-pong scheme.

Is my understanding correct?

What event should I use to start EDMA transfer?

Regards,

Gennadii

  • Hi Gennadi,

    You can refer to the xwr14xx mem_capture test under C:\ti\mmwave_sdk_02_01_00_04\packages\ti\drivers\test\mem_capture. This test demonstrates how to capture raw data from ADC buffer into L3 memory.

    Please note that code which is common to both xwr14xx and xwr16xx is abstracted out in common files capture.c and capture.h

    Regards

    -Nitin

  • Hi Nitin,

    I have studied this complicated code.

    From the code is not clear if ADC data ping-pong buffers are always ACCEL_MEM0 and ACCEL_MEM2?

    EDMA started manually from ISR invoked by SOC_XWR14XX_DSS_CHIRP_AVAIL_IRQ there.

    From the code is not clear if there is hardware event available to start EDMA or ISR is the only way?

    Regards,

    Gennadii

  • Hi Gennadii,

    1. The ADC ping/pong buffer is shared with ACCEL_MEM0 and ACCEL_MEM1 i.e. when using the hardware accelerator, the accelerator has direct access to the ADC data without the need for an EDMA to move in the ADC data for 1D FFT processing. When the ADC is writing to the Ping buffer, the accelerator processes the Pong buffer and vice-versa.

    2. Also note that the ADC switch between PING and PONG is seamless to the application which always reads ADC data at the same address (ADC buffer address). This means you will always read the data from adcBaseAddress if you want to transfer ADC data to L3 as it is done in the mem_capture application. 

    3. The mem_capture application does not use the hardware accelerator as it transfers the data from adcBaseAddress to L3 memory using EDMA. Please look at the function TestFmkCapture_finalizeCfg() in C:\ti\mmwave_sdk_02_01_00_04\packages\ti\drivers\test\mem_capture\capture.c, which performs the EDMA setup required to move data from adcBaseAddress to L3 memory. There is no reference of HWA ACCEL_x memories in this application as shown in the snapshot below.

        /* Populate the EDMA Channel Param set configuration: */
        ptrEDMAParamSetCfg->sourceAddress                          = (uint32_t)srcAddress;
        ptrEDMAParamSetCfg->destinationAddress                     = (uint32_t)dstAddress;
        ptrEDMAParamSetCfg->aCount                                 = ptrCaptureProfile->dmaElemSize;
        ptrEDMAParamSetCfg->bCount                                 = ptrCaptureProfile->dmaFrameCnt;
        ptrEDMAParamSetCfg->cCount                                 = 1U;
        ptrEDMAParamSetCfg->bCountReload                           = ptrEDMAParamSetCfg->bCount;
        ptrEDMAParamSetCfg->sourceBindex                           = ptrCaptureProfile->dmaElemSize;
        ptrEDMAParamSetCfg->destinationBindex                      = ptrCaptureProfile->dmaElemSize;
        ptrEDMAParamSetCfg->sourceCindex                           = 0;
        ptrEDMAParamSetCfg->destinationCindex                      = 0;

    4. The hardware event SOC_XWR14XX_DSS_CHIRP_AVAIL_IRQ is the only way to know when the samples are available in the ADC buffer. This even This event is handled in the corresponding ISR function TestFmkCapture_chirpAvailable. The event handling and ISR registration is done in the function TestFmk_loadProfile in C:\ti\mmwave_sdk_02_01_00_04\packages\ti\drivers\test\common\framework_core.c. Please look at the code snapshot below

        /* Do we need to register the chirp available function? */
        if (ptrProfileCfg->chirpAvailableFxn != NULL)
        {
            /* Initialize the SOC Listener configuration: */
            memset ((void*)&socIntCfg, 0, sizeof(SOC_SysIntListenerCfg));
    
            /* Populate the configuration: */
            socIntCfg.systemInterrupt  = gTestFmkHwAttrib.chirpAvailableSysInterrupt;
            socIntCfg.listenerFxn      = TestFmk_chirpISR;
            socIntCfg.arg              = (uintptr_t)ptrTestFmk;
            ptrTestFmk->chirpAvailableListenerHandle = SOC_registerSysIntListener(ptrTestFmk->initCfg.socHandle, &socIntCfg, errCode);
            if (ptrTestFmk->chirpAvailableListenerHandle == NULL)
            {
                /* Error: Unable to register the system interrupt; error code is already setup */
                goto exit;
            }
        }
    

    Regards

    -Nitin