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.

Compiler/IWR6843ISK-ODS: The application receives wrong bytes from UART.

Part Number: IWR6843ISK-ODS

Tool/software: TI C/C++ Compiler

Hi,

  We use 68xx_overhead_people_counting to implement an application in IWR6843-ODS to receive radar sensor data from UART. But the application sometimes receive wrong bytes in TLV header length field. Do you have any suggestions about the debugging?

The total frame size is 356 bytes.

The frame header: 02010403060508070300030342160A001BAAEDF86401000050D0020000000000F4010000F40100001447000086A800000200546E

The first TLV item: 

090000008800000020002000BF9B1843ED19000006002D0011B5C243D0236B3A00000000000000000000000000000000000000000080BB41B0A1FC400000614191139F4067DB813B000000000000000000000000C14B603D00000000000000000000000000000000000000402502D4413FCD1C426802C13F4BB920450000803F0000004000000000

The second TLV item:

0200000000A80000002D002D00280028001F001F000500050011001100140014001C001C0028002800290029000E000E000C000C001E001E001B001B0058005800860086009100910072007200620062008282005D005D0032003200590059005C005C00370037002F002F00110011007100710098009800740074005700570039003900350035002800280025002500380038004E004E005A005A00470047004000400024002400

The application received wrong header length (00A8) in second TLV item, The correct header length should be A800.

Can you please help to check what's wrong?

Thanks.

C.W.

  • Hello

    Can you please confirm if this happens with the C code and visualizer provided as part of the demo

    or

    This happens only with modification introduced as part of your receiving application.

    Than you,

    Vaibhav

  • Hi Vaibhav,

      I observe this issue in modification part and confirm the header length is 168 (A800) before UART_write() . So I don't know why the header length was changed to 43008 (00A8). Do you have any ideas to debug this issue?

    Thanks.

    C.W.

  • Hello

    Thank you for confirming that issue is related to modification introduced by the changes.

    You might want to look at changed introduced in the code and does it match well with TLV exceptions. Please check the variables and function that calculate these components in the TLV structure.

    At this point further debug would be dependent on what you are trying to achieve in the application code and introduce the change in incremental way while keeping compatibility with the visualizer's expectations.  We may be able to help with pin pointed objective support and won't be able to debug changes introduced by you.  Please bring the question to an objective level question to help you answer better.

    Thank you,

    Vaibhav

  • Hi Vaibhav,

      What's the TLV exception? I would like to know what's wrong with UART_write(). Are there any limitations in UART, like buffer size, I/O timing, and so on? 

    The simple flow likes as below concept

    Sensor data (Correct TLV header length) --> UART_write() --> Sensor data (Wrong TLV header length).

    Thanks.

    C.W.

  • Hello

    Are you saying there is a mismatch in the data struct value   vs  what is sent out on uart?

    Please let us know if you have confirmed this.

    - Does it happen on all frames

    - What changes have you made that change the sizes of data struct elements

    - can you make it save the values in a different buffer to observe.

    TLV format is explained in the User's guide.

    THank you,

    Vaibhav

  • Hi Vaibhav,

    Are you saying there is a mismatch in the data struct value   vs  what is sent out on uart?

    ==> Yes. The correct header length is 168 (A800), but the application receives the header length is 43008 (00A8).

    Does it happen on all frames?

    ==> No. It happen sometimes.

    What changes have you made that change the sizes of data struct elements

    ==> We follow TLV format to add two items (TLV type is 0x09 & 0x02) and found the strange.

    Can you make it save the values in a different buffer to observe?

    ==> We already did it. But it still happen sometimes.

    Thanks.

    C.W.

  • Hello

    It seem like these are errors are result of the  New TLV introduced by you. Debugging such code customization wont be possible at forum level we can provide guidelines for you to continue and alternative ways to achieve the same effect.

    Our guidelines are to:

    1. Check at run time that  value in live code  and compare uart out values.   i.e Confirm every count inside the device vs out on uart. Isolate what causes this fail.

    2. Given that it not happening consistently - try to recreate the failing value by forcing the error value in code.  -  Force error condition.

    3. Is this a new TLV added by you?  Try sending only this TLV and  reduce the size of data being sent out.

    4. Don't use TLV send the values out in as regular stream fashion to retrieve the requited data.   send only the count and then data without TLV to confirm if the issue is TLV creation  vs   uart.

    Hope this helps you debug further.

    Thank you,

    Vaibhav

  • Hi Vaibhav, 

      Thanks for your suggestion. We found the strange point is always happen in the bytes 193. We think it maybe a ringing buffer issue. Could you tell us what's the buffer size of UART? Is it possible enlarge the buffer size of UART?

    Thanks.

    C.W.

  • Hello,

    As a first step, have you followed pre-requisite 2 as given in the overhead demo user guide in the beginning? If not, please make sure you follow these steps to downgrade the XDS110 firmware. Let us know if you still see the data loss.

    Regards

    -Nitin