2025-01-02 01:02 AM
Happy New Year everyone !
I am currently trying to get the nmea sentences from the above gnss module (vic3da) i have connected the uart rx/tx and ground (gnd) and am able to ping the gps unit but unable to read any data from it has anyone ever written code that i might have a look at to know if I'm doing some thing wrong as I am completely new to MCUs or can anyone guide me to complete my project successfully ?
with regards
swayam :)
2025-01-21 07:42 AM - edited 2025-01-21 07:43 AM
So now connect MCU to a PC serial terminal via USB-to-UART:
2025-01-21 08:00 AM
Hi,
First step.
Check if UART-1-TX lines from VIC3DA has NMEA data without going through MCU board. This confirms if VIC3DA is outputting data in the UART port of GNSS module you are expecting data to come out of. Can you confirm this?
How to check:
- Check using oscilloscope or logic analyzer
- Or use USB to UART cable and open a serial terminal program or Teseo Suite
Second Step:
Use Getting Started Guide in X-CUBE-GNSS1 software package to configure your MCU.
I would start with VirtualCOMPort example. In this example MCU sends data out via a different UART. Another UART receives data from GNSS module.
Another example would be SimOSGetPos.
Refer to UM2334 for more details.
All initialization of GNSS module is done by X-CUBE-GNSS1 software.
You can post a screenshot of your GNSS setting in from CUBE-MX.
Question:
From your pin assignment diagram I only see 1 UART.
You need 2 UARTS if you want to see data on a terminal program.
GNSS module ---- UART_A -----> MCU ------ UART_B ----> Terminal program (just for debug purposes)
2025-01-21 08:10 AM
Hi
I have verified the stuff sent by the MCU (Just printed Helloworld).
I have verified both the stuff.
2025-01-21 08:17 AM
Try sending some GNSS sentences from the terminal.
You should be able to copy & paste ...
For sending stuff to the GNSS, remember that it may be choosy as to what line ending(s) it accepts.
Make sure that your receiving stuff handles whatever the GNSS uses as line endings.
Tips on debugging serial comms:
2025-01-21 09:24 AM
If everything is working it shouldn't be hard to close the circle..
GNSS typically just wants to output data in a continuous stream.
Avoid code that blocks, avoid arbitrary delays.
Reduce the amount of commands you send, check responses, and determine which need to get sent.
Make a simple forwarder to confirm end-to-end communication.