📜 ⬆️ ⬇️

STM32F429I debug board and GPS module. Get detailed information about satellites

image
Greetings to the habrasoobschestvo!

Not so long ago, the STM32F429I-DISCO debug board based on the STM32F429ZI controller came into my hands .
Perhaps its main distinguishing feature is in addition to a fairly productive Cortex M4 processor - an integrated 2.4-inch screen, which is quite enough for many experiments.
First of all, I naturally began to look for documentation and examples of it. Good documentation along with examples was found directly on the site st.com , but naturally I wanted more, tutorials and other things. This is what is missing from the novice programmer under ARM. But a detailed search did not give any great results. Therefore it was necessary to collect information on crumbs, analyze, revise and test it.

And I decided to somehow try to contribute to the popularization of this convenient platform.
But this post is not intended to solve some kind of all-encompassing problems, it is certainly aimed at beginners and those who would like to try, but they think that this is too difficult.

To whom it may seem interesting, welcome under cat.

')
In a nutshell, I will say about myself

I myself am a freelance programmer, but as sites and other programming as a little ate, pulled closer to the level of iron. But unfortunately, before that, C had very little to do, so I had to master, along the way, not only debugging with its periphery, but also the language and programming environment.

To business

Now about the essence of the project and briefly about the history, why it interested me.
Some time ago I wanted to make my own GPS tracker and in the process of its creation I ran into a number of problems. One of which was the problem of antennas, it was necessary to pick up a good antenna, as well as properly connect it. Another problem that stemmed from the first is the analysis of a GPS antenna based on the information provided by the GPS module. And with the advent of this debugging, this task has become easy for me to implement.

I took the EB-500 module as a basis, which can be easily obtained and its price tag is quite humane, and the main thing on the Internet is a lot of information on it. For example here . In this post I will not describe how to make your GPS module. You can buy it ready, and you can easily solder yourself on the link above.
I also believe that this code will be able to work with different modules that support the NMEA-0183 protocol without adaptation, but I cannot confirm this - I did not check it myself.

Development environment

After a short throwing chose the development environment KEIL. In my opinion, this is one of the most convenient development environments from existing under STM32.

Now programming

I started naturally with simpler things, I got used to the periphery, with the display and started working on the project directly.

The first task was to write a decent library for working with the USART to communicate with the GPS module.
The second task was to write a library for analyzing the data coming from the GPS module, in my case it is the analysis of NMEA commands.
The last task was to display the information on the debug screen and present it in a less convenient form for perception and analysis.

Also, for convenience of debugging the code, I figured out SWO (Serial Wire Viewer), it is very convenient to transfer debug information through this port directly through the USB connection of the debug board.

In the code, so that everything was not too boring, added a picture of the satellite as a screensaver, which appears when the board is turned on.

Actually what happened you can see here:

The video shows 3 stages. The first is connected to an active antenna that hangs on the window. The second - the antenna is removed from the window into the apartment. Third - the active antenna is disconnected from the module.



Code

I decided not to throw out all the code here, but laid it out on GitHub, it’s working, tested and quite simple, I think no one will have any problems with it, although I’ll just make a reservation - it’s very far to perfection, since I’m just a beginner. ” C "programmer, please take this into account.

One moment only seems to me to explain. My code is configured to work with USART1 and 9600 speed, but all these settings can be easily switched in the header file / mylibs/usartlib.h

GitHub Code

Further project development plans

Next, I want to implement the function of loading the Ephemeris into the EB-500 module, connecting the GPRS module to the debugging as well.

That's all, I hope my workings will be useful to someone. Good luck!

Source: https://habr.com/ru/post/216095/


All Articles