2014-02-28 06:27 AM
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... helfull2014-02-28 06:36 AM
if (USART_GetFlagStatus(USART1, USART_IT_RXNE) != RESET) // Received character?
GetFlagStatus should generally be used with USART_FLAG_xxx defines, ie USART_FLAG_RXNE
2014-02-28 06:58 AM