Receiving garbage data on UART

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Dear,

I have written the code for UART echo. Whatever I am sending from terminal it’s revert as same data. But some time I am getting garbage data. When I am sending data from device to Terminal, it’s works fine. Please check attached image. Please suggest or make a required changes.

0 Likes
1 Solution
ScWi_1017771
Level 2
Level 2
First like given

Start by working to narrow down where the (first) issue is.

Was the data received correctly? Save the received data in a memory buffer

and examine it in some other way, e.g. view with the debugger or output in

hex.

Capture serial data with an oscilloscope and examine it.

What data was sent? Save the received data in a memory buffer and examine

it in some other way.

Send a known, fixed sequence from memory and see whether it is sent

correctly.

Allow for the possibility that the terminal program has received garbage

data and has e.g. received an escape sequence.

On Thu, Aug 23, 2018, 3:53 AM bhavasar.bhagyesh_2998066 <

View solution in original post

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Please check the baud rate of the terminal you are using. It should be consistent all the time with the device baud rate. Please use "Teraterm " terminal and check once. The project you have attached is working fine with PSoC 5LP kit and and Teraterm terminal. Please go through the attached images.

Thanks and regards

Ganesh

0 Likes
ScWi_1017771
Level 2
Level 2
First like given

Start by working to narrow down where the (first) issue is.

Was the data received correctly? Save the received data in a memory buffer

and examine it in some other way, e.g. view with the debugger or output in

hex.

Capture serial data with an oscilloscope and examine it.

What data was sent? Save the received data in a memory buffer and examine

it in some other way.

Send a known, fixed sequence from memory and see whether it is sent

correctly.

Allow for the possibility that the terminal program has received garbage

data and has e.g. received an escape sequence.

On Thu, Aug 23, 2018, 3:53 AM bhavasar.bhagyesh_2998066 <

0 Likes