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.

IWR6843: Serial port transceiver problem

Part Number: IWR6843

Hi Team,

The customer uses the following serial port program, and the received data shifts. 

Send the following data from the serial port:

The debugging information of program control is as follows:

The customer would like to know what caused it?

Thanks,

Annie

  • Dear Annie:

    Could you please share an image of how the rxBuffer is stored in memory after UART_read() is called.

    Best regards,

    Connor Desmond

  • Hi Desmond,

    The customer adds the serial port program in CLI_task. Add rxBuffer to Watch Windowns, but can't find memory.

    Customer wants to know how to check the memory?

    Thanks,

    Annie

  • Dear Annie:

    I created a short little program which emulated the code snippet that you provided minus utilizing the UART API e.g. UART_read(). I was not able to replicate the out of order byte issue. This leads to me to think that there are 2 places that might be at issue.

    1. The serial terminal they are using may be the cause. I usually use PuTTY or Teraterm. Have them try those and see if that changes the output of the program.

    2. I see that they use System_printf() this could be the issue.

    The best way to iron out the cause of this bug is to use a debugger + a memory browser to view how the variables/data structures in the program differ line to line. If they can not find their memory browser then please have them google search their specific IDE and identify if they have a debugger as well as a memory browser. Assuming that they are using CCS, then both of these features are present and need to be used.

    Best regards,

    Connor Desmond

  • Hi Connor,

    1. Putty's serial interrupt is used, and the input data is correct. But the serial port protocol required by the customer is hexadecimal, and Putty seems to be unable to use hexadecimal.

    2. The customer used the previous serial port assistant and blocked the System_printf() statement.

    3. The memory of rxBuffer after UART_read() is found, as shown in the figure below:

    1) The correct memory display of rxBuffer:

    2) Error rxBuffer memory display:

    3) After the error is displayed, the 17 in the memory cannot be cleared.

    4) When the data input is changed to 00010203040506, the wrong data will appear again. After inputting 0001020304050607, the output data is correct.

    Best regards,

    Annie

  • Annie:

    I can see from image 1 that indeed that at memory address 0x08007498 you have the correct byte sequence. In image 2 I can see that the 0x17 byte is now out of order.

    1. What generated the correct data in memory? Was it the same serial terminal or something else? If the current serial terminal software initially produces the correct result in memory then after some number of instructions later the memory gets changed then that needs to be shared.

    I would suggest finding another serial terminal that works for the application to try to replicate the issue. If the circular shift can not be reproduced then we can determine that the issue is with the serial terminal software which is the prime suspect. Also can you provide all of the changes that were performed to mss_main.c, so that I can get more context.

    Best regards,

    Connor Desmond

  • Hi Connor,

    When the serial port receives wrong data, this part of the program will be lost. But as long as the wrong data is received, it will always be wrong. Customers have tried to reduce the data bytes to less than 8 bytes, or the data bytes are greater than eight bytes. The last byte of data is always placed in the first position of the received byte and is not moved circularly.

    The customer wants to know whether this serial port receiving program can clean up the buffer again when the received data is less than 8 bytes or more than 8 bytes and the data is not sent next time? In other words, can the data be received all at once when the data is read next time?

    Thanks,

    Annie

  • Annie:

    I am continuing to look into the issue, but I will need a couple of days to give you a more informed response.

    Best,

    Connor Desmond

  • Annie:

    Your customer is using UART_read(), have them use UART_readPolling() instead. Let me know if this works.

    Best,

    Connor Desmond