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/AWR1642: UART info send

Part Number: AWR1642

Tool/software: Code Composer Studio

Hi,

I am working with lab0012_srr_16xx from the mmwave industrial toolbox trying to figure out where in the code is the information regarding the distance of the detected obstacles is send. 

By now I have only found this lines of code in the mss_main.c that use UART function to send data but when printing their values they dont look like identifiers and/or coordenates/distances of the detected obstacles:

#else
                    {
                        uint32_t totalPacketLen;
                        uint32_t numPaddingBytes;
                        uint32_t itemIdx;

                        /* Send header */
                        totalPacketLen = sizeof(MmwDemo_output_message_header);
                        UART_writePolling (gSrrMSSMCB.loggingUartHandle,
                                           (uint8_t*)&message.body.detObj.header,
                                           sizeof(MmwDemo_output_message_header));
                        System_printf ("The header is %d \n",   (uint8_t*)&message.body.detObj.header);


                        /* Send TLVs */
                        System_printf ("Number of messages is %d \n",   sizeof(message.body.detObj.header.numTLVs));
                        for (itemIdx = 0;  itemIdx < message.body.detObj.header.numTLVs; itemIdx++)
                        {
                            System_printf ("itemIdx is %d \n",  itemIdx);
                            UART_writePolling (gSrrMSSMCB.loggingUartHandle,
                                               (uint8_t*)&message.body.detObj.tlv[itemIdx],
                                               sizeof(MmwDemo_output_message_tl));
                            System_printf ("First UART message is %d \n",  (uint8_t*)&message.body.detObj.tlv[itemIdx]);

                            UART_writePolling (gSrrMSSMCB.loggingUartHandle,
                                               (uint8_t*)SOC_translateAddress(message.body.detObj.tlv[itemIdx].address,
                                                                              SOC_TranslateAddr_Dir_FROM_OTHER_CPU,NULL),
                                               message.body.detObj.tlv[itemIdx].length);

                            System_printf ("Second UART message is %d \n", (uint8_t*)SOC_translateAddress(message.body.detObj.tlv[itemIdx].address,SOC_TranslateAddr_Dir_FROM_OTHER_CPU,NULL));
                            totalPacketLen += sizeof(MmwDemo_output_message_tl) + message.body.detObj.tlv[itemIdx].length;
                        }

                        /* Send padding to make total packet length multiple of MMWDEMO_OUTPUT_MSG_SEGMENT_LEN */
                        numPaddingBytes = MMWDEMO_OUTPUT_MSG_SEGMENT_LEN - (totalPacketLen & (MMWDEMO_OUTPUT_MSG_SEGMENT_LEN-1));
                        if (numPaddingBytes<MMWDEMO_OUTPUT_MSG_SEGMENT_LEN)
                        {
                            uint8_t padding[MMWDEMO_OUTPUT_MSG_SEGMENT_LEN];
                            System_printf ("MMWDEMO_OUTPUT_MSG_SEGMENT_LEN is %d and numPaddingBytesis  %d \n",  MMWDEMO_OUTPUT_MSG_SEGMENT_LEN, numPaddingBytes);

                            /*DEBUG:*/ memset(&padding, 0xf, MMWDEMO_OUTPUT_MSG_SEGMENT_LEN);
                            UART_writePolling (gSrrMSSMCB.loggingUartHandle, padding, numPaddingBytes);
                            System_printf ("Padding is %d \n",  padding);

                        }
                    }

Where can I find the lines of code responsible of sending that information ?

Thank you

Jaume 

  • Hi,

    Please review in dss_main.c the function "SRR_DSS_SendProcessOutputToMSS()"

    Thank you
    Cesar
  • Hi,

    Thank you for the response,

    Could you please state which variables in the mentioned function perform the task of sending the distance or coordinates of the objects?

    I can only really understand the number of detected objects but not it's information nor how to retrieve it.

    Sincerely,

    Jaume 

  • Hello Jaume,
    MSS gets object info from the DSS, if you go to MmwDemo_dssSendProcessOutputToMSS function (dss_main.c)
    'obj->detObj2D' contains object coorinates, peakVal and other info which is being copied to mesage of type 'MMWDEMO_OUTPUT_MSG_DETECTED_POINTS' and send out to MSS (which further send the same data over UART).

    I hope from this point you can back trace in the source file to get the objects list and it's detailed info.


    Regards,
    Jitendra