element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
IoT on Wheels Design Challenge
  • Challenges & Projects
  • Design Challenges
  • IoT on Wheels Design Challenge
  • More
  • Cancel
IoT on Wheels Design Challenge
Blog IOT on Wheels Design Challenge - Smart Drive - MBed with GPS Receiver - Blog #8
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vlasov01
  • Date Created: 9 Nov 2017 1:49 AM Date Created
  • Views 489 views
  • Likes 2 likes
  • Comments 0 comments
  • iot on wheels design challenge
  • nucleo l476rg
  • ubx
  • arm mbed
  • usart3
  • gps receiver
  • smartdrive
Related
Recommended

IOT on Wheels Design Challenge - Smart Drive - MBed with GPS Receiver - Blog #8

vlasov01
vlasov01
9 Nov 2017

IOT on Wheels Design Challenge - Smart Drive - Project Index

Connecting Nucleo STM32L476RG USART3 Serial Port with GPS Receiver

In one of my previous blog posts I've described how to connect GPS receiver to the Nucleo board using STM32CubeMX tool and STM32Cube libraries.But I've realized that STM32CubeMX is not aware of Nucleo Expansion Boards. As result, I switched back to MBed platform. I was not sure if USART3 TX and RX still going to work with my Nucleo board connected to two expansion boards at the same time. I've ported again UBX GPS MultipleMessages code this time to MBed and configured Nucleo STM32L476RG Nucleo Morfio pins PC_10 and PC_11 as USART3 TX and RX ports.

 

Serial gps(PC_10, PC_11); //USART3 tx, rx

 

This time I've used MBed serial callback instead of STM32Cube interrupts to process serial input from GPS receiver.

gps.attach(&gps_msg_callback, Serial::RxIrq);

 

Then I've connected the board with GPS receiver serial ports.

 

I've tried by connecting pins Nucleo STM32L476RG Nucleo ST morfo connector pins PC_10 and PC_11 to GPS receiver serial ports.

 

Callback Lesson

I was not very optimistic that it will work right away. And it was not working at first as I've added as well printf function in my serial callback processing for debug purposes. But after some googling I found that the code in callback function should be very fast and shouldn't use any expensive I/Os. After removing printf debug code the code for GPS serial output processing start start working.

 

Test

The following screenshot provides a view on content of variables populated by processing GPS data. I'm using U-Blox UBX protocol NAV-POSLLH message to get location and NAV-STATUS to get details if my GPS readings are valid.

image

 

Summary

At this point all major components are in place, connected and functioning as expected. So I'm very happy about it. But there are still a lot of work left in the few remaining days before the end of the contest on November 13th.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube