MCU는 CPU나 GPU와 다르게 낯설지만, 가장 많이 사용되는 반도체 중 하나다. ST 시스템 솔루션 랩의 유지 카와노 매니저에게 MCU의 활용성과 가능성이 얼마나 큰지 들어보자.
Monitor location information with GNSS function expansion board
Using the board with basic positioning coordinate application
When you enter a command number, the desired data is displayed.
[Editor's Note] Generally, when we talk about semiconductors, we tend to think of semiconductors that are familiar to the general public, such as the CPU and memory of computers. On the other hand, MCUs (Micro Controller Units), which are used as core semiconductors for operating electronic products, are semiconductors that are still unfamiliar to the general public, even though they are commonly used in all electronic products that we easily come across. These MCUs have recently been featured in the media due to the semiconductor shortage, and have begun to attract the attention of the general public. Accordingly, this magazine has prepared a place to learn about MCUs through a series of articles by Yuji Kawano, manager at STMicroelectronics, a company specializing in MCU semiconductors.
.jpg)
Let's monitor your own latitude and longitude location using STMicroelectronics' general-purpose 32-bit microcomputer development board 'NUCLEO-L476RG' and the function expansion board 'X-NUCLEO-GNSS1A1' equipped with a GNSS (Global Navigation Satellite System) positioning IC.
The vehicle-mounted GNSS positioning IC mounted on the expansion board is called 'Teseo III' and is installed with ST's GNSS module 'Teseo-LIV3F'. This time, we will look at the GNSS data via the terminal tool.
■ First, prepare the hardware Connect NUCLEO-L476RG and X-NUCLEO-GNSS1A1. There are other STM32 Nucleo boards to choose from, but here we choose the L476, which already has a basic position acquisition application (GetPos_XX).
The antenna included with X-NUCLEO-GNSS1A1 is connected when checking operation (it is OK even if it is not connected here).
■ Next, prepare the software ○ Install STM32CubeProgrammer (skip if installation is already complete)
If you are using the STM32NUCLEO board on a PC for the first time, install STM32CubeProgrammer (formerly ST Link Utility) to prepare the COM port driver, etc. (STM32CubeProgrammer is not used in this posting, but the driver is required).
This tool is required to write firmware programs on the STM32 board. After unzipping the download file, open the executable file and follow the instructions to install.
If you have already installed STM32CubeProgrammer, you do not need to do this.
STM32CubeProgrammer ○ Preparing software for operation
Download the following software files from the STMicroelectronics website.
X-CUBE-GNSS1 When you unpack the downloaded file, a working folder for the integrated development environment is created. The demonstration program file (binary file) to be used this time is prepared in the folder below, so write it to the STM32 Nucleo board.
Drive:...\STM32CubeExpansion_GNSS1_VX.XX\Projects\STM32L476RG-Nucleo\Applications\GetPos_I2C\Binary
When you connect the STM32 Nucleo board to your PC via USB, if the driver is working properly, a device called 'NODE_XXXX' is recognized.
Drag and drop the file you want to record (binary. *.bin) onto the target STM32 Nucleo board.
Here we copy the program file called GetPos_I2C.bin to NODE_L46RG (this completes the firmware writing to the STM32 microcomputer).
■ Check operation ○ Setup
Connect the STM32 Nucle board and the X-NUCLEO-GNSS1A1 board via the Arduino connector. Connect the included antenna to the antenna connector on the X-NUCLEO-GNSS1A1 board. Once ready, connect the USB to the PC.
The antenna body should be installed outdoors or near a window with a view of the sky.
○ Start the terminal tool
Use the serial port to check operation on the PC. Install a terminal emulator tool such as TeraTerm on your PC in advance.
Select ‘Serial Port’ and choose the COM port corresponding to the STM32 Nucleo. After that, click OK.
Select Port: 「COM x: STMicroelectronics STLink Virtual COM Port」
Set up the serial port as follows:
Baud rate=115200, Date=8bit, Parity=None, Stop bit=1
When you press the reset button (black switch) on the STM32 Nucleo board, the following list of commands is displayed.
(Supplement) At the end, it will say "Save configuration (y/n)", but ignore it.
※ Some useful commands
1) GETPOS: Obtains and decodes the $GPGGA NMEA message and outputs location information.
4)HELP: Prints the command menu.
8) GETFWVER: Issues ST's unique command $PSTMGETSWVER to output the firmware version in the Teseo module.
11) GETGPRMC: Get & decode $GPRMC messageDo it. Recommended Minimum Specific GPS/Transit data.
12) GETGSAMSG: Acquires and decodes the $--GSA message, and outputs the precision degradation rate (GNSS DOP) and active satellite information.
13) GETGSVMSG: Acquires and decodes $--GSV message, and outputs information on visible satellites. Output is by satellite positioning system.
○ Check GNSS messages
By entering the command number, you can display the desired data. Here are some display examples for typical messages.
>1-getpos:$GPGGA (essential fix data. Provide 3D location and accuracy data)
(Type "1" in terminal)
Corresponds to the NMEA $GPGGA message. Outputs basic 3D position information.
UTC: Coordinated Universal Time (Japan time = UTC + 9 hours)
Latitude : Latitude
Longitude : Longitude
Altitude : Altitude
>11-getgprmc: $GPRMC (essential gps pvt (position, velocity, time) data. Recommended Minimum)
(Type "11" in terminal)
Corresponds to the NMEA $GPRMC message. Outputs basic position information (coordinates, time, speed). If you only want to know the latitude and longitude coordinates, this message is effective. You can also get the date information.
>12-getgsamsg: $GPGSA (GPS DOP and active satellites)
(Type "12" in terminal)
Corresponds to the NMEA $GPGSA message. Outputs active satellite information. Also includes Degradation of Precision (DOP) information.
In the next GUI section, we will introduce a simpler way to operate using GUI tools. You can also track on the map.