uart receives the same byte!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-17 04:46 PM
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
Solved! Go to Solution.
- Labels:
-
STM32L0 Series
-
UART-USART
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-17 05:18 PM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-17 05:18 PM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-17 05:18 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-17 10:02 PM
> It receives the first letter "$" eighty times !!
How do you know?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-08-18 10:56 AM
Are the UART1 registers opened in debugger view? (not a good idea)
-- pa