Meet our team in San Diego, United States, from Tuesday 22 until Thursday 25 of April at XPONENTIAL, booth 4700

Update (15/04/2024): We have plenty of stock of all our products, find us also in and    Shop now

Meet our team in San Diego, United States, from Tuesday 22 until Thursday 25 of April at XPONENTIAL, booth 4700

How to connect simpleRTK2B RTK receiver to STM32 Nucleo

cover debug STM32

In this tutorial you will see how to connect the simpleRTK2B series receiver with a STM32 Nucleo L152RE board for a debug session.

If your project needs multiband RTK technology, we want to make things easy for you. We have uploaded in our Github site an example code to parse the UBX messages from the u-blox ZED-F9P, so you don’t need to spend nonproductive time writing code that is not related with your project.

Required hardware:

Required software:

  • u-center (if you do not have it installed, you can download it here. Do not know how? In this video we show you how to do it)
  • IAR Embedded Workbench (if you do not have it installed, you can download it here, and follow the instructions prepared by IAR)

How to debug with simpleRTK2B series receiver and STM32 Nucleo?

Watch this video or just follow the steps below to see how to connect the simpleRTK2B with a STM32 Nucleo L152RE board for a debug session.

First, connect the hardware.
  1. Before connecting your receiver and STM32, make sure that your receiver has headers soldered. If not, you can do it by yourself with the help of soldering iron.
  1. Connect simpleRTK2B receiver in to the STM32 Nucleo board. The headers are not symmetric so you cannot do it wrong. Just be careful do not bend the pins.
  1. Plug the GNSS antenna to your ArduSimple receiver, place your antenna in a location with good view of the sky, or near a window for testing the functionality.

  1. Connect STM32 Nucleo board to your computer using microUSB to USB-A cable.
  1. Connect your receiver to your computer using microUSB to USB-A cable.
    Note: Your receiver may have 2 microUSB connectors, so that you need to use connector marked as “POWER+GPS”.
Secondly, get the example code.
  1. In this tutorial we show that the data read by STM32 code is the same as the one read by u-center. For this we will show side to side both data.
  1. Downlodad the example code from the ArduSimple Github site. Click Code and copy the repository url, and clone the repository onto your PC. 
  1. Open u-center software and connect to your receiver by pressing Receiver —>Port —>COM3 or just press Ctrl+3 to connect to simpleRTK2B series receiver via COM3.
  1. Open IAR EWARM project.
    Download and debug the project to the STM32 Nucleo board.
    And that’s all! We are now debugging.
    By the default, the program hits a breakpoint in the main function. Press the button or F5 to continue the execution.
Thirdly, debug.
  1. Now we want to make sure that the code reads the same values as u-center. We will open the gnss.c file and place a breakpoint in the message parcer. Since the program was running, it hits the breakpoint and stops.
  1. Add a watch window by pressing View — >Watch —> Watch1 and type in “expression” field “sensors”.
  1. You will see the values of the variable “sensor”. It contains a structure with GNSS information. 
  1. In this example only a few messages are parsed. It shows a comprehensive way to help you add other messages.
    By pressing F5, the code will run until hitting the breakpoint again. In this example, messages are sent at 1Hz.
    You can verify that the data is exactly the same in u-center and in the STM32 program.
  1. You can see the veriables values by placing the mouse over the variable. By pressing F10 you can advance step by step in the program execution. 
  1. And that’s how easy it is to get RTK GNSS variables to use on your own application.

Enable RTK!

We have prepared all the products you need to turn on RTK in your STM32 related project. You can enable RTK by ordering products from ArduSimple.

 

If you liked this content, you can follow us on Twitter, YouTube, Facebook or LinkedIn to stay updated of content like this.

Want to learn more about GPS/RTK?

1. Our engineering team will contact you to solve any questions
2. We will keep you updated about promotions and new product releases
3.You will only hear from us when we have important news, we won’t spam your email