AnsweredAssumed Answered

STM32L - UART data processing

Question asked by guillot.benjamin on Feb 28, 2014
Latest reply on Feb 28, 2014 by guillot.benjamin
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


Outcomes