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.

AWR1642BOOST: Need help for getting realtime data through COM port AWR1642 EVM

Part Number: AWR1642BOOST

Dear Sir or Madam,

I follow the mmwave sdk training "Demo capture" I can get ADC raw data and do some signal processing offline. However, I need to do it in real-time. Can I transmit ADC raw data through COM port using UART or some other protocol to display real-time data in the Hyperterminal, Tetraterm.

For example, I have ADC data in gFrameAddress[0]. How can I transmit data and update it every time through a COM port ? 

Thank you

  • Hello,


    In the mmWave demo processed data is sent over the UART port. Due to slow speeds of UART raw data collected over multiple chrips and receiver's would not be a feasible option. However in theory this is doable and can be implemented by modifying the function that send data out.

    Please look at the following function in dss_main.c file
    int32_t MmwDemo_dssSendProcessOutputToMSS

    The above function gets called at the end of a frame processing and send the processed data out over UART. You might want to modify that to send Raw ADC data in addition. Please note ADC buffer is the source of Raw data and it gets over written at the end of every chirp and multiple such chirps constitute a Frame. You might have copy out the Raw data before ADC buffer gets over written.

    Starting out with slower frame rate and few chrips per frame would be a good way to approach this.

    Hope this points you into right direction.

    Thank you,
    Vaibhav
  • Hi Vaibhav Mahimkar,

    I want to begin with demo_capture. Because I make it work, and I can get raw data from the demo_capture. I work on mss_main.c file in CortexR4f. Would you please recommend me with the function in the mss_main.c of demo_capture to get ADC data and put it to L3 memory. If I program the chirp to 1 frame with 256 adc sample, can I send 256 ADC sample through UART by using the function in the mss_main.c of demo_capture. 

    Thank you

  • Hello Minh,
    You would need to compute your ADC data rate and check if it can fit into the UART rate. For example if you keep the ADC sampling rate at 10Msps , 12 bit real sampling mode , 4 recevier channels the ADC data rate would be 10*12*4 = 480Mbits per second. The UART can support a few 100 Kbits per second data rate.

    Regards,
    Vivek
  • Dear Vivek Dham,

    I set up the minimum requirement for ADC and UART. If I open hyperterminal or teraterm through the COM port XDS110 class Auxiliary Data Port with Baud : 921600. Can I see the data receiving. Do you know what is the tool to see the data run through the PC, what I mean is the data display on mmwave demo visualizer. Thanks

  • Can you tell me what is the name of variable in the code that has ADC data ? There are a lot of ADCBuf variable in the code and i do not know what is the right place to get adc data
  • Hello,
    The capture demo by default is not sending out the ADC data over UART, you would need to modify the code inorder to achieve that. Once you have done that you can use hyper terminal tool to receive the data over the UART port and then save it to a file. We do not have a tool to plot the raw ADC data from the UART port, you can do this using a simple Matlab or Labview code. An example matlab code is provided as part of the SDK (in the following location: MMWAVE_SDK v01.00.00.05\packages\ti\demo\xwr16xx\capture\gui).

    Regards,
    Vivek
  • Hello,

    To send raw adc data over UART, I would suggest using DSS UART  which will cause min. change in the demo code. 

    Here are the code snippet and comments which will help you complete this task at your end.

    dss_main.c:

    • /* copy data from AdcBuffer memory to UART in CPU mode where user needs to specify num of bytes based on numOfSamplesconfigued to Radar */

                  UART_writePolling(gMmwDssMCB.loggingUartHandle, SOC_XWR16XX_DSS_ADCBUF_BASE_ADDRESS, num_of_Bytes);

    • /* call UART_writePolling when DSS gets chirp Interrupt 'CaptureDemo_dssChirpIntHandler' */
    • /*  CaptureDemo_dataPathProcessEvents(CAPTURE_CHIRP_EVT) is get called when DSS gets CAPTURE_CHIRP_EVT */

    /* Handle dataPath events */
    switch(event)
    {
         case CAPTURE_CHIRP_EVT:

          /** change code here to copy AdcBuff data to UART instead copying to L3 memory ***/

    Regards,

    Jitendra Gupta

  • Dear Jitendra Gupta,

    Based on my understanding, I will do like this. Can you check for me this is right or wrong. And I do not understand this comment : 

    • /* call UART_writePolling when DSS gets chirp Interrupt 'CaptureDemo_dssChirpIntHandler' * . Could you give an example how to do it ? Thanks

    Here is my modify function

    static int32_t CaptureDemo_dataPathProcessEvents(UInt event)
    {
    Capture_dmaConfig *ptrDmaCfg = NULL;
    int32_t retVal = 0;
    Capture_DataPathObj *ptrDataPathObj;

    /* Get data path object handle */
    ptrDataPathObj = &gCaptureMCB.dataPathObj;

    /* Handle dataPath events */
    switch(event)
    {
    case CAPTURE_CHIRP_EVT:
    /* Increment event stats */
    gCaptureMCB.stats.chirpEvt++;

    UART_writePolling(gMmwDssMCB.loggingUartHandle, SOC_XWR16XX_DSS_ADCBUF_BASE_ADDRESS, num_of_Bytes);

    //comment out all of this

    /*

    /* Get saved Device configuration from CLI */
    ptrDmaCfg = &ptrDataPathObj->dmaConfig;

    DebugP_assert(ptrDataPathObj->edmaState == Capture_EDMA_STATE_READY);

    if ((ptrDmaCfg->currDstAddr + ptrDmaCfg->dmablockSize) < ptrDmaCfg->endDstAddr)
    {
    retVal = EDMA_setDestinationAddress (ptrDataPathObj->dmaHandle, (uint16_t) ptrDmaCfg->channelId,
    SOC_translateAddress(ptrDmaCfg->currDstAddr,SOC_TranslateAddr_Dir_TO_EDMA,NULL));
    if(retVal < 0)
    {
    System_printf("Error: Set EDMA destination address failed with Error[%d]\n", retVal);
    }

    /* Trigger DMA transfer */
    EDMA_startDmaTransfer(ptrDataPathObj->dmaHandle, ptrDmaCfg->channelId);

    ptrDataPathObj->edmaState = Capture_EDMA_STATE_BUSY;

    ptrDmaCfg->currDstAddr += ptrDmaCfg->dmablockSize;
    }
    else
    {
    /* Reach the end of the RAM buffer */
    }
    break;

    */

    break;

    case CAPTURE_FRAMESTART_EVT:
    /* Increment event stats */
    gCaptureMCB.stats.frameStartEvt++;

    //comment out also

    /*

    /* Set the destination address to the beginning of the buffer for every frame */
    ptrDmaCfg->currDstAddr = DEMO_L3RAM_DATA_MEM_ADDRESS;
    break;

    */

    break;

    default:
    break;
    }
    return 0;
    }

  • Hello Jitendra Gupta

    Should I modify the dss_main.c in mmw_demo or capture_demo ?

    Thank you!

  • Hello Minh Nguyen87

    Do you complete the modification successfully? I changed the code in dss_main.c in mmw demo, but I failed transfer the data in adcbuff to PC throught DSS UART. 

  • Due to inactivity for a long time, we assume that your query has been resolved, so closing this thread.



    For any further query related to this thread, please post your question, which will re-open this thread.



    Regards,
    Jitendra Gupta