HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
  • GM-3568JHF

    • 1. Introduction

      • GM-3568JHF Introduction
    • 2. Quick Start

      • 01 Environment Construction
      • 02 Compilation Instructions
      • 03 Burning Guide
      • 04 Debugging Tools
      • 05 Software Update
      • 06 View information
      • 07 Test Command
      • 08 Application Compilation
      • 09 Source code acquisition
    • 3. Peripherals and Interfaces

      • USB
      • Display and touch
      • Ethernet
      • WIFI
      • Bluetooth
      • TF-Card
      • Audio
      • Serial Port
      • CAN
      • RTC
    • 4. Application Development

      • 01 UART read and write case
      • 02 Key detection case
      • 03 LED light flashing case
      • 04 MIPI screen detection case
      • 05 Read USB device information example
      • 06 FAN Detection Case
      • 07 FPGA FSPI Communication Case
      • 08 FPGA DMA read and write case
      • 09 GPS debugging case
      • 10 Ethernet Test Cases
      • 11 RS485 reading and writing examples
      • 12 FPGA IIC read and write examples
      • 13 PN532 NFC card reader case
      • 14 TF card reading and writing case
    • 5. QT Development

      • 01 ARM64 cross compiler environment construction
      • 02 QT program added automatic startup service
    • 6. Others

      • 01 Modification of the root directory file system
      • 02 System auto-start service

09 GPS debugging case

1 Case Introduction

This case aims to introduce how to test the GPS function of obtaining positioning information.

2 GPS access development board

As shown in the figure, GPS can be connected to the TTL interface of the development board, namely UART4.

GPS_1

3 Operation process

Open the terminal and copy the executable program smdt_gps_demo in the bin directory of this case (05-Development Materials\Software Development Materials\linux_demo\smdt_gps_demo\bin) to the development board file system (the source code can be viewed in the src path).

Execute the following command in the terminal to switch to the directory where the smdt_gps_demo executable program is located

#切换到 smdt_gps_demo 可执行程序所在目录
cd ‘the file's directory’

#查看 smdt_gps_demo 是否在该目录下
ls

If the executable file smdt_gps_demo is in the current directory, modify the permissions of the executable file

#添加可执行权限
chmod +x smdt_gps_demo

#查询是否修改成功
ls -ld smdt_gps_demo

After confirming that the file modification permission is successful, execute ./smdt_gps_demo -h to view the help information of the program. The default parameters set in this test script are as follows: device: /dev/ttyS4 UART4 baud: 9600 The default baud rate is 9600

#查看帮助信息
./smdt_gps_demo -h

The execution result is as follows:

GPS_2

Enter the following command to obtain the current GPS data. If the positioning is successful, the coordinates and other data will be displayed. If the positioning is unsuccessful, a prompt will be displayed. Please check whether the GPS antenna module has correctly obtained the positioning signal.

#GPS显示定位信息
./smdt_gps_demo -d /dev/ttyS4 -b 9600

Positioning is successful, and the positioning information is displayed with an interval of 1S. The execution results are as follows:

GPS_3

Positioning fails and a prompt message is displayed. The execution results are as follows:

GPS_4

Press Ctrl+C to force quit the program

GPS_5
Edit this page on GitHub
Last Updated:
Contributors: zsl, zwhuang
Prev
08 FPGA DMA read and write case
Next
10 Ethernet Test Cases