2024-06-28 07:19 AM - last edited on 2024-06-28 09:34 AM by SofLit
Hi, I am using STM 32 STLINK-V3. Thereis a problem with following UART receiver function.
__HAL_UART_CLEAR_FLAG(&huart5, UART_CLEAR_NEF|UART_CLEAR_OREF);
HAL_UART_Receive(&huart5, rx_buffer, ROVER_MSG_LEN, 1000);
__HAL_UART_DISABLE_IT(&huart5,UART_IT_RXNE);
. Without clearing the flag rx_buffer remains empty even though there is a data observed from hardware with oscilloscope. I stept into the function and see flag remains up constantly but now only varying few initial bits of the buffer gets the data still rest remians empty. Is this a bug does any one knows ?
2024-07-02 01:47 AM
" You're doing a lot of unnecessary byte comparison when you're working with strings. Just do a string comparison using strncmp " thanks a lot such a great advice to increase efficiency. Also about a while loop you are right I am trying to write it with a polling.
2024-07-02 01:48 AM - edited 2024-07-02 01:48 AM
I connected seems like it is working through converter but still could not solve the problem.
2024-07-04 02:04 AM - edited 2024-07-04 02:09 AM
@Kuttay wrote:These two gnss are connected to each other with uart2
Again, how do you connect two GNSS units to one UART ?
See this post for why you can't just short two outputs together:
How do you avoid that when connecting the two GNSS units to one UART?