STM32L - UART data processing
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-28 6:27 AM
Posted on February 28, 2014 at 15:27
Hi every body,
Im using the stm32L discovery. My UART is well configured. UART1 on PB6/PB7. I try to get data via GPS transmeter. I got a ot of problem in data acquisition. So i try to get data from GPS and send them instantanely to see what happened on a scope. What i see is strange.. I must receive lot of data, but what i resend from my board are data comptletely different from the acquisiton! What i do in my while: if (USART_GetFlagStatus(USART1, USART_IT_RXNE) != RESET) // Received character? { rx = USART_ReceiveData(USART1); USART_SendData(USART1,rx); } But i only send 3 data, i think i dont understand how its work! Data i have to receive are like this : $PSRF100,4,38400,8,1,0*38<CR><LF> I dont know for now how i rebuild this, so i try to get the first word, and resend it. Is it possible ? What i do wrong! Thank you all for any answer! Im alone on this project so some help would be very... helfull
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-28 6:36 AM
Posted on February 28, 2014 at 15:36
if (USART_GetFlagStatus(USART1, USART_IT_RXNE) != RESET) // Received character?
GetFlagStatus should generally be used with USART_FLAG_xxx defines, ie USART_FLAG_RXNE
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-02-28 6:58 AM
Posted on February 28, 2014 at 15:58 Hi Sir, Thank you, i didn't see this mistake! Well, im lost anyway! really lost! But i have so new idea, i will test them! and come back probably : ) Thank you for the answer! Have a good afternoon!
