cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L communication between 2 USART

kitjazax
Associate II
Posted on March 25, 2015 at 17:39

Hello all,

I 'm novice and

using STM32L152RE to do a communication between 2 USARTs

I use USART2 for recieving GPS Data and I would like to echo all recievied data without parsing on PC Terminal by using USART3 but I  only got a unreadable character return. Can someone please help me with it?

Thank you
12 REPLIES 12
kitjazax
Associate II
Posted on April 02, 2015 at 10:55

thanks for your response I have tested it and unfortunately it comes up only one weird character on output  thank you anyway!

Posted on April 02, 2015 at 15:16

Did the original echo/loop of the GPS NMEA data work? Or do you need a different baud rate?

Perhaps you can output all the strings, instead of just the first one, or reviewing the data memory in a debugger.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kitjazax
Associate II
Posted on April 02, 2015 at 15:46

while(USART_GetFlagStatus(USART3, USART_FLAG_RXNE) == RESET); // Wait for Char
Data = USART_ReceiveData(USART3); // Collect Char
while(USART_GetFlagStatus(USART2, USART_FLAG_TXE) == RESET); // Wait for Empty
USART_SendData(USART2, Data); // Echo Char

It works fine with your example above loop to echo all received data what to do next,I want to parse the data and print out some important information like time date latitude ...etc but it 's not working