cancel
Showing results for 
Search instead for 
Did you mean: 

uart receives the same byte!!!

xmart
Associate II

I am using Stm32l0 and am receiving data from GPS via uart but I am facing this problem.

uart receives the first byte and then repeats the number of bytes it wanted to receive

For example:

AL_UART_Receive (& huart1, buf, 80, 200);

It receives the first letter "$" eighty times !!

like this $$$$$$$$$$$$$$$$$........80 time

1 ACCEPTED SOLUTION

Accepted Solutions

That's great, but what do you expect anyone to do with one line of code outside any context?

Is this a custom board, or one someone else might be familiar with?

Which UART is the GPS attached too?

Is there another UART debug information can be printed too?

Attach, not-inline, a single source file if it contains all the code for clocks, pins and peripheral initialization, or a whole project as a single .ZIP file.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

4 REPLIES 4

That's great, but what do you expect anyone to do with one line of code outside any context?

Is this a custom board, or one someone else might be familiar with?

Which UART is the GPS attached too?

Is there another UART debug information can be printed too?

Attach, not-inline, a single source file if it contains all the code for clocks, pins and peripheral initialization, or a whole project as a single .ZIP file.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

Do you have the ability to probe the lines to see what is actually being sent?

Bump up the timeout from 200 to HAL_MAX_DELAY to see if that changes things.

Ensure your clock settings are correct.

If you feel a post has answered your question, please click "Accept as Solution".

> It receives the first letter "$" eighty times !!

How do you know?

JW

Pavel A.
Evangelist III

Are the UART1 registers opened in debugger view? (not a good idea)

-- pa