App_uart manifests as one byte buffer.

Hi,

I am running into this issue when receiving over uart where the byte received is always one byte behind relative to the byte sent by the sender. The byte received is either, a) nothing if it's the first communication, or b) the byte of the previous message sent by the sender.

I get this behavior in both the unchanged uart example, as well as the libuarte example in SDKs 15,16,17 (haven't tested others).

For example:

Sent: 0

Received: 

Sent: 1

Received: 0

Sent: 2

Received: 1

What do I have to change in the uart and libuarte loopback examples to see the following behavior?

Sent: 0

Received: 0

Sent: 1

Received: 1

Sent: 2

Received: 2

Parents Reply
  • EugeneBrod said:
    What could be causing this one byte delay on our machines?

    It's hard to say exactly what is causing this, but there may be some buffering somewhere that is causing this. Since you are seeing the same behavior with different examples and kits, it sounds like it is the other side of the UART that is the problem, but it would help to verify this if you could get hold of a logic analyzer of check the UART lines with a scope, to see if the data is transmitted/received when expected.

    Do you have a Windows PC where you can test with Termite as described in my previous post, or putty with the recommended settings? Also make sure that you have the USB connected directly in the PC, and not through a hub, etc.

Children
Related