I recently purchased a Sparkfun NEO-M9N, and I have it hooked up via I2C to collect NMEA data. I output the sentences into Serial at the moment but would eventually like to write the information to the Teensy 4.1 onboard SD card. I configured the GPS module using the developer software to send information at 10Hz and only give me RMC, GGA, and GSA NMEA sentences. When I use an Arduino Uno and the example code given by the manufacturer, it runs exactly as expected, but when I hook it up to a Teensy 4.1, it gives the information below
I tried adjusting the baud rate on the GPS and the Teensy, but none seemed to work and continued to give me bad data. The code for that was Example 1_BasicNMEARead. If anyone can help me figure out what the issue may be and some solutions would be greatly appreciated.
The question marks could be binary-format UBX data. Or possibly RTCM. Have you run any other examples from the SparkFun GNSS library? Some enable periodic UBX messages.
Also, at 10Hz, you need to be careful you are not overloading either the I2C port, or the UART1 port. If you search the forum, you will see many posts about disabling NMEA messages on UART1 if they are not needed.
UART1 has a default of 38400 baud which will be a choke-point as data volume and solution rate increase. A $GxTXT “txbuf,alloc” warning foreshadows a failure of this nature.
If UART1 is not being used it can be disabled.
The I2C may still be problematic as the interactions are more processor intensive. What are the <?> unprintable symbols here? 0xFF patterns?
If this continues to be an issue perhaps chase it down to the wire library level. I can provide some examples if that helps.
At 10 Hz the NEO-M9N will drop to 16 satellite solutions.