HAL Library 35- GPS parser for STM32Fxxx

GPS library is a generic NMEA GPS parser for STM32Fxxx devices.


Read more about HAL libraries


  • Parse GPS data
  • Supported NMEA 0183 standard
  • Works with GPGGA, GPRMC, GPGSA, GPGSV NMEA statements
  • Calculate distance between 2 coordinates
  • Calculate bearing between 2 coordinates
  • Allows you to select custom NMEA statements


  • HAL
  • TM
    • STM32Fxxx HAL
    • defines.h configuration file
    • TM GPIO
    • TM USART

Pinout, functions and enumerations

List of pinout, functions and its enumerations can be found on GPS library API


FILTER example with FIR and IIR is available on my Github account.

TM STM32 Libraries

STM32 libraries based on STM32Fxxx HAL drivers.


Owner of this site. Also electronic enthusiasts, web developer, 3D printer fan, handball player and more. Big fan of STM32F4 devices. In anticipation of the new Discovery board for STM32F7 lines.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!
  • Pingback: All STM32 HAL libraries - STM32F4 Discovery()

  • Pingback: Library 27- Read GPS data on STM32F4 devices - STM32F4 Discovery()

  • Faisal Haque

    hi I am getting wrong value….. actual value is 23.818041,90.425323. but I am getting https://uploads.disquscdn.com/images/d458a8f76993d7b1e0f6fba9e202d1ff02c62afb6494b9267b56a0af0b163682.jpg

    • How you know it is wrong. Where you receive your coordinates? My gps libs parses what gps receiver sends. If I wrongly parse incoming data is lib problem, otherwise it is your.

      • Faisal Haque

        using arduino library I am getting the correct coordinates. But using your’s library I’m getting the wrong coordinates. please help he to solve the problem.

        • Send me plain gps output. Send me all possible gps outpit statements you receive. Will test that.

          • Faisal Haque

            please give me your email id. I’ll send everything including GPS output.

          • Faisal Haque

            Here is the GPS output from module…..