cancel
Showing results for 
Search instead for 
Did you mean: 

Messy UART message

AFidi.1
Associate II

I'm trying to logging Teseo LIV3FL using my STM32 Nucleo-WL55JC1. I've tried in my ESP32 before and it works as it is. However, when I tried to use them in my Nucleo board, the message are messy or mixed between other messages.

0693W00000WK4VVQA1.png 

Expected Output:

Received Data: $GPGGA,081020.000,0745.76016,S,11023.30496,E,0,03,99.0,186.70,M,0.0,M,,*79

Current Output:

$GPGGA,081020.000,0745.Received Data: 76016,S,11023.30496,E,0,03,99.0,186.70,M,0.0,M,,*79

I suspect it caused because the UART is still busy when I send another message. Any workaround how to manage the messages so they didn't mixed up?

2 REPLIES 2
S.Ma
Principal

Are you implementing sw fifo to dodge hickups? Baudrate? Interrupt style uart management? Any higher prio interrupt that last too long ?

You really make no effort to synchronize to the data stream, you just wait for blobs of 100 characters, and then dump them to the UART with your "Received Data:" message in between.

Presumably get junk characters because you miss the indication from the I2C GPS that you've exhausted the data stream. Probably NAK's. Not sure how the HAL signals that.

Perhaps don't print your message, and look at situations where the buffer is empty or truncated.

Or for that matter if there's a method for the GPS to tell you have much data is available.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..