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.

AWR1642: How to get real-time data through COM port in terminal

Part Number: AWR1642

Hello, 

I can use mmwave Demo Visualizer to see the radar test results, and I also can use Capture Demo to get off-line data in a time. But I want to get real-time data to track some targets in time, I hope receive the data in terminal and then save it in a file.

So, Can you tell me how to get real-time data through COM port?

  • Hello Jian Tang,
    Do you intend to have the object data saved and then replay the data later ? Or are you looking to have the ADC data over COM port and save it in the file?

    Thanks,
    Raaghu
  • Hi, Raaghu

    I want to get the raw adc data over UART, can I transmit ADC raw data through COM port using UART or some other protocol to display real-time data in the Hyperterminal, Tetraterm?

    Thanks,
    Jian
  • Jian,

    The query seems to be answered in below post:
    e2e.ti.com/.../2259741

    Thanks,
    Raghu
  • Hi, Raghu

    Yes, I refer to this discussion. I comment out original codes CAPTURE_CHIRP_EVT in function CaptureDemo_dataPathProcessEvents (caputre_demo dss_main.c), and add UART_writePolling(gMmwDssMCB.loggingUartHandle, SOC_AR16XX_DSS_ADCBUF_BASE_ADDRESS, sizeOf_AdcBuff_configured_per_chirp) here, is it right? What should I do next?

    switch(event)
    {
    case CAPTURE_CHIRP_EVT:
    /* Increment event stats */
    gCaptureMCB.stats.chirpEvt++;
    
    UART_writePolling(gMmwDssMCB.loggingUartHandle, SOC_AR16XX_DSS_ADCBUF_BASE_ADDRESS, sizeOf_AdcBuff_configured_per_chirp);
    
    break;
    
    // comment
    if(0)
    {
    /* 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;
    }

    Jian

  • And which demo configuration option should I choose?
    1) MSS 2)DSS 3) MSS & DSS
  • Hello Jian,

    Sorry for the delayed reply due to holidays.
    The suggestion in the earlier posts was to use the DSS UART. Please consider choosing the DSS option(2) .

    -Raghu
  • Hello, Raghu

    I modify capturedemo dss_main.c, add text code 'System_printf ("successed\n")' when DSS gets chirp Interrupt 'CaptureDemo_dssChirpIntHandler'. And I choose MSS & DSS configure in Teraterm, configrue profile is shown below:

    flushCfg
    dfeDataOutputMode 1
    channelCfg 2 1 0
    adcCfg 0 1
    adcbufCfg 0 0 1 1
    profileCfg 0 77 20 5 80 0 0 40 1 256 8000 0 0 30
    chirpCfg 0 0 0 0 0 0 0 1
    frameCfg 0 0 128 0 20 1 0
    lowPower 0 0
    sensorStart

    I can get stings 'successed' in console continuously. At the same method, I want to call function UART_writePolling to get real EVM capturing adc raw data from serial port, but it do not work.

    // UART_writePolling (gCaptureMCB.loggingUartHandle, (uint8_t*)&logMessage[0], sizeMessage);
    // #define SOC_XWR16XX_DSS_ADCBUF_BASE_ADDRESS 0x21000000U /* ADC buffer memroy space: 0x2100:0000-0x2100:07FC */
    // num_of_Bytes = profileCfg.numAdcSamples* 2 <16 bit each sample>* 2 <if complex>* adcbufCfg.chirpThreshold
    UART_writePolling (gCaptureMCB.loggingUartHandle, SOC_XWR16XX_DSS_ADCBUF_BASE_ADDRESS, num_of_Bytes);


    Maybe there are some additional settings for using UART_writePolling like ad raw data addrass or data size, so could you give me some advises for calling UART_writePolling function?

    Thanks,
    Jian

  • Hello Jian,
    Have you tried giving option '3' in "Demo Selection" option?

    I have tried this option and got 1 chirp worth ADCBuff on DSS UART with your change added in dss_main.c


    Regards,
    Jitendra
  • Hello, Jitendra

    I have tried to choose option '3) MSS is responsible for Control Path and DSS is responsible for Data Path', but still do not get ad raw data anywhere.

    Where should I find out the ad raw data? Teraterm or Console in CCS?

    So, could you shot screen about your chirp worth ADCBuff on DSS UART for me?

    And if can you copy codes about function 'CaptureDemo_dataPathProcessEvents' and show your configure for me, it will help a lot for me.

    Thanks, 

    Jian

  • Hello Jitendra,

    Here are my operation results to test function UART_writePolling, I modify capture demo dss_main.c codes about CaptureDemo_dataPathProcessEvents: 

    static int32_t CaptureDemo_dataPathProcessEvents(UInt event)
    {
        char buffer[6] = "hello\n";
    
        .......
    
        /* Increment event stats */
        gCaptureMCB.stats.chirpEvt++;
    
        switch(event)
        {
            case CAPTURE_CHIRP_EVT:
            UART_writePolling (gCaptureMCB.loggingUartHandle,(uint8_t*)&buffer[0],6);
            System_printf ("%d\n",gCaptureMCB.stats.chirpEvt);
            break;
    
        ......
    
        }
    }
    

    I can get count number "123456....." from CSS Console(Fig.1.), it proves mmWave enters the interrupt routine CAPTURE_CHIRP_EVT.

    And I want to test the function UART_writePolling, so I define the buffer is a string 'hello/n', its length is 6, address is (uint8_t*)&buffer[0].

    I refer to ''extern int32_t UART_writePolling(UART_Handle handle, uint8_t *buffer, uint32_t size);'' call UART_writePolling, but I can not get anything from teraterm.(Fig.2.)

    So, could you tell me which steps are wrong? According to my understanding, I should be able to receive continuous output ‘hello’ from teraterm.

    Fig.1.

     


    Fig.2.

    Looking forward to your reply, THANKS.

    Jian

  • Hello Jian,
    DSS UART comes on DEVPACK board where FTDI enumerates 4 COM port, you need to connect 4th COM port and baudrate 115200.

    Please try this experiment with DEVPACK stacked with AWR1642BOOST board.

    Regards,
    Jitendra
  • Hello Jitendra,

    I am sorry for the late reply.

    From you words, if I want to get real-time data using DSS UART, I have to get other board DEVPACK, and I am going to buy another boards.

    Because of the disscussion "On AWR1642BOOST two COM ports are assigned to MSS UARTs (one for CLI [Tx/Rx] and other is for Data object transmission [Tx only]).If you need to use DSS UART then you need to stack up AWR1642BOOST with MMWAVE-DEVPACK, where DSS UART directs to COM port (3rd) enumerated via DEVPACK".

    But does it mean I can not get data only by AWR1642. I can see MSS UARTs T/R to CLI, so can I get AD raw data modifing the MSS main.c codes only using AWR1642 board?

    Regards,

    Jian

  • Dear Jian,

    Do you intend to use Raw ADC data over UART. What is your duty cycle?

    Can you clarify. Standard interface for RAW ADC data is LVDS/CSI2. You can use any LVDS or MIPI CSI2 compliant receiver to receive RAW ADC data.

    If you really intend to send sample ADC data over UART, you need to use MSS UART to send

    Regards,
    Kaushal