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.

CCS/IWR6843: lvds of IWR6843

Part Number: IWR6843
Other Parts Discussed in Thread: DCA1000EVM

Tool/software: Code Composer Studio

HI,ALL!

when i use iwr6843, the  LVDS demo.\packages\ti\drivers\cbuff\test\xwr68xx doesn't work, we can't detect the LVDS clock signal, why? 

THKS.

  • Hi,

    Can you share more details (including pictures) of your setup?

    Regards,

    Charles O

  • Thank you ,Charles O!

    I  just modify the following functions(two),and no others changs.Could you tell me how to test the LVDS interface on IWR6843, THKS  a lot.

    1  .\packages\ti\drivers\cbuff\test\xwr68xx\main_mss.c

    static void Test_initTask(UArg arg0, UArg arg1)
    {
        SOC_Handle              socHandle;
        int32_t                 errCode;
        EDMA_Handle             edmaHandle;
        EDMA_errorConfig_t      errorConfig;
        EDMA_instanceInfo_t     instanceInfo;
        ADCBuf_Params           params;
        ADCBuf_Handle           adcBufHandle;
        /* Get the SOC Handle: */
        socHandle = (SOC_Handle)arg0;
        /* Initialize the test logger framework: */
        MCPI_Initialize ();
        /* Initialize the EDMA: */
        errCode = EDMA_init(0);
        if (errCode != EDMA_NO_ERROR)
        {
            System_printf("Error: Unable to initialize EDMA, errorCode = %d\n", errCode);
            return;
        }
        System_printf ("Debug: EDMA instance 0 has been initialized\n");
        /* Open the first edma Instance */
        edmaHandle = EDMA_open(0, &errCode, &instanceInfo);
        if (edmaHandle == NULL)
        {
            System_printf("Error: Unable to open the edma Instance, erorCode = %d\n", errCode);
            return;
        }
        /* Setup the EDMA Error Monitoring: */
        errorConfig.isConfigAllEventQueues              = true;
        errorConfig.isConfigAllTransferControllers      = true;
        errorConfig.isEventQueueThresholdingEnabled     = true;
        errorConfig.eventQueueThreshold                 = EDMA_EVENT_QUEUE_THRESHOLD_MAX;
        errorConfig.isEnableAllTransferControllerErrors = true;
        errorConfig.callbackFxn                         = Test_edmaErrorCallbackFxn;
        errorConfig.transferControllerCallbackFxn       = Test_edmaTransferControllerErrorCallbackFxn;
        errCode = EDMA_configErrorMonitoring(edmaHandle, &errorConfig);
        if (errCode != EDMA_NO_ERROR)
        {
            System_printf("Debug: EDMA_configErrorMonitoring() failed with errorCode = %d\n", errCode);
            return;
        }
        /***************************************************************************************
         * ADCBUF Initializations:
         ***************************************************************************************/
        ADCBuf_init ();
        /* Open the ADC Driver: */
        ADCBuf_Params_init(&params);
        /* Setup the chirp thresholds: */
        params.chirpThresholdPing = 1U;
        params.chirpThresholdPong = 1U;
        params.continousMode      = 0U;
        /* Open the ADC Driver: */
        adcBufHandle = ADCBuf_open(0, &params);
        if (adcBufHandle == NULL)
        {
            System_printf ("Error: Unable to open the ADC Driver\n");
            return;
        }
    #if 1
        /* Test: Invalid Data Size */
        if (Test_InvalidDataSize (socHandle, edmaHandle) < 0)
            return;
        /* Test the Non-Interleaved Mode: */
        if (Test_dataFormats (socHandle, edmaHandle, adcBufHandle, CBUFF_DataMode_NON_INTERLEAVED) < 0)
            return;
    #endif
     #if 0
        /* Test Multiple Sessions: */
        if (Test_MultipleSessions (socHandle, edmaHandle, adcBufHandle) < 0)
            return;
     #endif
     while(1)
     {
       CBUFF_DriverMCB * pp =(CBUFF_DriverMCB *)cbuffHandle;
       SOC_DriverMCB*      ptrSOCDriverMCB;
       ptrSOCDriverMCB = (SOC_DriverMCB*  )pp->initCfg.socHandle;
       System_printf (" ptrSOCDriverMCB:%x\n",ptrSOCDriverMCB->ptrTopRCMRegs);
       
       System_printf ("numActiveLVDSLanes:%d ptrCBUFFReg:%x\n",pp->numActiveLVDSLanes, pp->ptrCBUFFReg);
       System_printf ("Sleep 5s frmcnt:%d errnum:%d\n",pp->totalNumFrameStart, pp->totalNumErrorInterrupts);
       Task_sleep(5000);
     }
     #if 0
        /* Test: EDMA Memory allocation failures */
        if (Test_EDMAChannelAllocationFailures (socHandle, edmaHandle, adcBufHandle, CBUFF_DataMode_NON_INTERLEAVED) < 0)
            return;
        /* Test: Multiple Chirp Mode */
        if (Test_MultipleChirpMode (socHandle, edmaHandle, adcBufHandle) < 0)
            return;
        /* Deinitialize the SOC Module: */
        if (SOC_deinit (socHandle, &errCode) < 0)
            System_printf ("Error: Unable to close the SOC Module [Error code %d]\n", errCode);
        /* Set the MCPI result for Test Automation */
        MCPI_setTestResult ();
        /* Unit Testing is complete */
        System_printf ("Debug: CBUFF Unit Tests completed\n");
        /* exit BIOS */
        BIOS_exit(0);
     
        return;
     #endif
    }
    2 .\packages\ti\drivers\cbuff\test\common\test_common.c
       CBUFF_Handle        cbuffHandle;
    CBUFF_SessionHandle sessionHandle;

    int32_t Test_dataFormats
    (
        SOC_Handle      socHandle,
        EDMA_Handle     edmaHandle,
        ADCBuf_Handle   adcBufHandle,
        CBUFF_DataMode  dataMode
    )
    {
        CBUFF_SessionCfg    sessionCfg;
        CBUFF_DataFmt       dataFormat;
        int32_t             errCode;
        char                testMessage[256];
        CBUFF_InitCfg       initCfg;
        uint8_t             numChannel;
        /* Debug Message: */
        System_printf ("---------------------------------------------------\n");
        System_printf ("Debug: Testing CBUFF Data Formats in %s mode\n",
                       (dataMode == CBUFF_DataMode_INTERLEAVED) ? "Interleaved" : "Non Interleaved");
        System_printf ("---------------------------------------------------\n");
        /* Initialize the configuration: */
        memset ((void*)&initCfg, 0, sizeof(CBUFF_InitCfg));
        /* Populate the configuration: */
        initCfg.socHandle                = socHandle;
        initCfg.outputDataFmt            = CBUFF_OutputDataFmt_16bit;
        initCfg.enableECC                = 1U;
        initCfg.crcEnable                = 1U;
      //  initCfg.enableDebugMode          = false;
     initCfg.enableDebugMode          = true;
        initCfg.maxSessions              = 2U;
        initCfg.interface                = CBUFF_Interface_LVDS;
        initCfg.u.lvdsCfg.crcEnable      = 0U;
        initCfg.u.lvdsCfg.msbFirst       = 1U;
        initCfg.u.lvdsCfg.ddrClockMode   = 1U;
        initCfg.u.lvdsCfg.ddrClockModeMux= 1U;
        /* Setup the lanes: This configuration is platform specific */
    #ifdef SOC_XWR14XX
        initCfg.u.lvdsCfg.lvdsLaneEnable = 0xFU;
    #else
        initCfg.u.lvdsCfg.lvdsLaneEnable = 0x3U;
    #endif
        /* Initialize the CBUFF Driver: */
        cbuffHandle = CBUFF_init (&initCfg, &errCode);
        if (cbuffHandle == NULL)
        {
            System_printf ("Error: CBUFF Driver initialization failed [Error code %d]\n", errCode);
            return -1;
        }
     numChannel = 1;
        /* Cycle through all the ADC Channels */
      //  for (numChannel = 1U; numChannel <= SYS_COMMON_NUM_RX_CHANNEL; numChannel++)
        {
            /* Enable the  */
            Test_enableADCChannel (adcBufHandle, numChannel);
      dataFormat = CBUFF_DataFmt_ADC_DATA;
            /* Cycle through all the data formats: */
           // for (dataFormat = CBUFF_DataFmt_ADC_DATA; dataFormat < CBUFF_DataFmt_MAX; dataFormat++)
       //     {
                /* Create the MCPI Test Message: */
                sprintf (testMessage, "CBUFF HW Session: ADC Channels=%d Data Format [%s] %s",
                         numChannel,
                         (dataMode == CBUFF_DataMode_INTERLEAVED) ? "Interleaved" : "Non-Interleaved",
                         gCBUFFDataFormatString[dataFormat]);
                /* Initialize the configuration */
                memset ((void*)&sessionCfg, 0, sizeof(CBUFF_SessionCfg));
                /* Populate the configuration: */
                sessionCfg.executionMode                      = CBUFF_SessionExecuteMode_HW;
      // sessionCfg.executionMode                      = CBUFF_SessionExecuteMode_SW;
                sessionCfg.edmaHandle                         = edmaHandle;
                sessionCfg.allocateEDMAChannelFxn             = Test_EDMAAllocateCBUFFChannel;
                sessionCfg.freeEDMAChannelFxn                 = Test_EDMAFreeCBUFFChannel;
                sessionCfg.dataType                           = CBUFF_DataType_COMPLEX;
                sessionCfg.header.size                        = 0U;
                sessionCfg.header.address                     = 0U;
                sessionCfg.u.hwCfg.dataMode                   = dataMode;
                sessionCfg.u.hwCfg.dataFormat                 = dataFormat;
                sessionCfg.u.hwCfg.opMode                     = CBUFF_OperationalMode_CHIRP;
                sessionCfg.u.hwCfg.numChirpsPerFrame          = 0x20U;
                sessionCfg.u.hwCfg.chirpMode                  = 0x1U;
                sessionCfg.u.hwCfg.numADCSamples              = 256U;
                sessionCfg.u.hwCfg.adcBufHandle               = adcBufHandle;
                sessionCfg.u.hwCfg.cqSize[0]                  = 0U;
                sessionCfg.u.hwCfg.cqSize[1]                  = 128U;
                sessionCfg.u.hwCfg.cqSize[2]                  = 128U;
                sessionCfg.u.hwCfg.userBufferInfo[0].address  = (uint32_t)&gUserBuffer0[0];
                sessionCfg.u.hwCfg.userBufferInfo[0].size     = sizeof(gUserBuffer0);
                sessionCfg.u.hwCfg.userBufferInfo[1].address  = (uint32_t)&gUserBuffer1[0];
                sessionCfg.u.hwCfg.userBufferInfo[1].size     = sizeof(gUserBuffer1);
                sessionCfg.u.hwCfg.userBufferInfo[2].address  = (uint32_t)&gUserBuffer2[0];
                sessionCfg.u.hwCfg.userBufferInfo[2].size     = sizeof(gUserBuffer2);
                /* Create the HW Session: */
                sessionHandle = CBUFF_createSession (cbuffHandle, &sessionCfg, &errCode);
                if (sessionHandle == NULL)
                {
                    System_printf ("Error: Unable to create the session [Error code %d]\n", errCode);
                    MCPI_setFeatureTestResult (testMessage, MCPI_TestResult_FAIL);
                    return -1;
                }
                /* Debug Message: Display the EDMA Channel Usage for the test. */
                System_printf ("Debug: EDMA Channel Usage = %d\n", gCBUFFEDMAChannelResourceCounter);
                /* Activate the session: */
                if (CBUFF_activateSession (sessionHandle, &errCode) < 0)
                {
                    System_printf ("Error: Unable to activate the session [Error code %d]\n", errCode);
                    MCPI_setFeatureTestResult (testMessage, MCPI_TestResult_FAIL);
                    return -1;
                }
        MCPI_setFeatureTestResult (testMessage, MCPI_TestResult_PASS);
      // while(1)
      //  {
      //  ;
      //  }
    #if 0
                /* Deactivate the session: */
                if (CBUFF_deactivateSession (sessionHandle, &errCode) < 0)
                {
                    System_printf ("Error: Unable to deactivate the session [Error code %d]\n", errCode);
                    MCPI_setFeatureTestResult (testMessage, MCPI_TestResult_FAIL);
                    return -1;
                }
                /* Delete the session: */
                if (CBUFF_deleteSession (sessionHandle, &errCode) < 0)
                {
                    System_printf ("Error: Unable to delete the session [Error code %d]\n", errCode);
                    MCPI_setFeatureTestResult (testMessage, MCPI_TestResult_FAIL);
                    return -1;
                }
                /* Sanity Check: Ensure that all the EDMA resources have been cleaned up */
                if (gCBUFFEDMAChannelResourceCounter != 0)
                {
                    System_printf ("Error: EDMA Channel Memory leak detected\n");
                    return -1;
                }
                MCPI_setFeatureTestResult (testMessage, MCPI_TestResult_PASS);
    #endif
       //     }
        }
    #if 0
        /* Deinitialize and shutdown the CBUFF: */
        if (CBUFF_deinit (cbuffHandle, &errCode) < 0)
        {
            System_printf ("Debug: CBUFF Driver deinit %s failed [Error code %d]\n", errCode);
            return -1;
        }
    #endif
        return 0;
    }
  • Are you using the DCA1000EVM? Please share a picture of the actual board setup 

  • I didn't use the DCA1000EVM, the IWR6843 lvds's data output to a FPGA board that we designed.

    Thks for you reply, I have picked some suggestion from others in this BBS, and I can continue my work.

    If there is a update for IWR6843 LVDS's demo ,pls email me ,my email is 200731@qq.com ,thks a lot!