初学者
10 分钟

使用MIA-M10Q和STM32L496AG开发快速且准确的资产跟踪解决方案

用于高性能定位功能的超低功耗GNSS接收器

GNSS 14 Click with Discovery kit with STM32L496AG MCU

已发布 7月 22, 2025

点击板

GNSS 14 Click

开发板

Discovery kit with STM32L496AG MCU

编译器

NECTO Studio

微控制器单元

STM32L496AG

通过专业级GNSS接收器增强资产跟踪,具有异常灵敏度和快速信号获取功能,以实现在各种挑战环境中的最佳位置可用性。

A

A

硬件概览

它是如何工作的?

GNSS 14 Click 基于u-blox的MIA-M10Q,一个标准精度的GNSS模块。Super-S(超级信号)技术提供了出色的射频灵敏度,可以在小天线或非视距场景中提高动态位置精度。它拥有SMA天线连接器,阻抗为50Ω,可以连接MIKROE提供的适当GNSS天线,如GPS&GLONASS无源天线,以改善范围和接收信号强度。u-blox接收器包括一个时间脉冲功能,提供可配置的脉冲周期、脉冲长度和极性(上升或下降沿)。它还具有备用电源选项。您可以通过BAT连接器将电池

连接到GNSS 14 Click。GNSS 14 Click 使用标准的2线UART接口与主机MCU通信,使用常见的UART RX和TX引脚,波特率从4800到921600bps。您也可以使用I2C接口,但仅限于从模式,最大比特率为400kbps。在这两种情况下,UBX和NMEA协议均受支持。时间脉冲信号通过TP引脚提供。外部中断信号通过EIT可以用于时间标记功能、时间辅助和从省电模式唤醒。RST引脚允许您使用低电平逻辑状态重置GNSS模块。除了这些引脚,该Click board™还有

一个标记为IO6的数字I/O引脚,可以根据用户的需求定义此引脚的用途。需要强调的是,当为I/O分配不同功能时,请确保禁用默认功能(如果适用)。该Click board™只能在3.3V逻辑电压水平下运行。使用不同逻辑电平的MCU之前,板子必须进行适当的逻辑电压水平转换。此外,它还配备了包含函数和示例代码的库,可以作为进一步开发的参考。

GNSS 14 Click hardware overview image

功能概述

开发板

32L496GDISCOVERY Discovery 套件是一款功能全面的演示和开发平台,专为搭载 Arm® Cortex®-M4 内核的 STM32L496AG 微控制器设计。该套件适用于需要在高性能、先进图形处理和超低功耗之间取得平衡的应用,支持无缝原型开发,适用于各种嵌入式解决方案。STM32L496AG 采用创新的节能架构,集成

了扩展 RAM 和 Chrom-ART 图形加速器,在提升图形性能的同时保持低功耗,使其特别适用于音频处理、图形用户界面和实时数据采集等对能效要求较高的应用。为了简化开发流程,该开发板配备了板载 ST-LINK/V2-1 调试器/编程器,提供即插即用的调试和编程体验,使用户无需额外硬件即可轻松加载、调

试和测试应用程序。凭借低功耗特性、增强的内存能力以及内置调试工具,32L496GDISCOVERY 套件是开发先进嵌入式系统、实现高效能解决方案的理想选择。

Discovery kit with STM32L496AG MCU double side image

微控制器概述 

MCU卡片 / MCU

STM32L496AG Image

建筑

ARM Cortex-M4

MCU 内存 (KB)

1024

硅供应商

STMicroelectronics

引脚数

169

RAM (字节)

327680

你完善了我!

配件

主动GPS天线旨在提升您的GPS和GNSS Click boards™的性能。这款外置天线具有坚固的结构,非常适合各种天气条件。其频率范围为1575.42MHz,阻抗为50欧姆,确保信号接收可靠。天线在较宽的角度范围内提供超过-4dBic的增益,覆盖率超过75%。带宽为±5MHz,进一步保证了数据采集的精确度。具有右旋圆极化(RHCP)特性,这款天线提供稳定的信号接收。其紧凑的尺寸为48.5x39.15mm,配有2米长的电缆,便于安装。磁性天线类型带有SMA公头连接器,确保安全便捷的连接。如果您需要一个可靠的外置天线来为您的定位设备提供支持,我们的主动GPS天线是完美的解决方案。

GNSS 14 Click accessories 1 image

使用的MCU引脚

mikroBUS™映射器

User-Configurable I/O
PA4
AN
Reset
PB2
RST
ID COMM
PG11
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
External Interrupt
PA0
PWM
Timepulse Output
PH2
INT
UART TX
PG10
TX
UART RX
PB6
RX
I2C Clock
PB8
SCL
I2C Data
PB7
SDA
NC
NC
5V
Ground
GND
GND
1

“仔细看看!”

Click board™ 原理图

GNSS 14 Click Schematic schematic

一步一步来

项目组装

Discovery kit with STM32H750XB MCU front image hardware assembly

从选择您的开发板和Click板™开始。以Discovery kit with STM32L496AG MCU作为您的开发板开始。

Discovery kit with STM32H750XB MCU front image hardware assembly
Thermo 21 Click front image hardware assembly
Prog-cut hardware assembly
Thermo 21 Click complete accessories setup image hardware assembly
Board mapper by product7 hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Discovery kit with STM32H750XB MCU NECTO MCU Selection Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Necto image step 11 hardware assembly

实时跟踪您的结果

应用程序输出

1. 应用程序输出 - 在调试模式下,“应用程序输出”窗口支持实时数据监控,直接提供执行结果的可视化。请按照提供的教程正确配置环境,以确保数据正确显示。

2. UART 终端 - 使用UART Terminal通过USB to UART converter监视数据传输,实现Click board™与开发系统之间的直接通信。请根据项目需求配置波特率和其他串行设置,以确保正常运行。有关分步设置说明,请参考提供的教程

3. Plot 输出 - Plot功能提供了一种强大的方式来可视化实时传感器数据,使趋势分析、调试和多个数据点的对比变得更加直观。要正确设置,请按照提供的教程,其中包含使用Plot功能显示Click board™读数的分步示例。在代码中使用Plot功能时,请使用以下函数:plot(insert_graph_name, variable_name);。这是一个通用格式,用户需要将“insert_graph_name”替换为实际图表名称,并将“variable_name”替换为要显示的参数。

软件支持

库描述

该库包含 GNSS 14 Click 驱动程序的 API。

关键功能:

  • gnss14_parse_gngga - 此函数从读取响应缓冲区中解析GNGGA数据。

  • gnss14_reset_device - 此函数通过切换RST引脚来重置设备。

开源

代码示例

完整的应用程序代码和一个现成的项目可以通过NECTO Studio包管理器直接安装到NECTO Studio 应用程序代码也可以在MIKROE的GitHub账户中找到。

/*!
 * @file main.c
 * @brief GNSS 14 Click Example.
 *
 * # Description
 * This example demonstrates the use of GNSS 14 Click board by reading and displaying
 * the GNSS coordinates.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes the driver and resets the Click board.
 *
 * ## Application Task
 * Reads the received data, parses the GNGGA info from it, and once it receives the position fix
 * it will start displaying the coordinates on the USB UART.
 *
 * ## Additional Function
 * - static void gnss14_clear_app_buf ( void )
 * - static err_t gnss14_process ( gnss14_t *ctx )
 * - static void gnss14_parser_application ( char *rsp )
 *
 * @author Nenad Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "gnss14.h"

// Application buffer size
#define APP_BUFFER_SIZE             500
#define PROCESS_BUFFER_SIZE         200

static gnss14_t gnss14;
static log_t logger;

static uint8_t app_buf[ APP_BUFFER_SIZE ] = { 0 };
static int32_t app_buf_len = 0;

/**
 * @brief GNSS 14 clearing application buffer.
 * @details This function clears memory of application buffer and reset its length.
 * @note None.
 */
static void gnss14_clear_app_buf ( void );

/**
 * @brief GNSS 14 data reading function.
 * @details This function reads data from device and concatenates data to application buffer. 
 * @param[in] ctx : Click context object.
 * See #gnss14_t object definition for detailed explanation.
 * @return @li @c  0 - Read some data.
 *         @li @c -1 - Nothing is read.
 * See #err_t definition for detailed explanation.
 * @note None.
 */
static err_t gnss14_process ( gnss14_t *ctx );

/**
 * @brief GNSS 14 parser application.
 * @param[in] rsp Response buffer.
 * @details This function logs GNSS data on the USB UART.
 * @return None.
 * @note None.
 */
static void gnss14_parser_application ( char *rsp );

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    gnss14_cfg_t gnss14_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    gnss14_cfg_setup( &gnss14_cfg );
    GNSS14_MAP_MIKROBUS( gnss14_cfg, MIKROBUS_1 );
    if ( UART_ERROR == gnss14_init( &gnss14, &gnss14_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    
    gnss14_reset_device( &gnss14 );
    log_info( &logger, " Application Task " );
}

void application_task ( void ) 
{
    if ( GNSS14_OK == gnss14_process( &gnss14 ) ) 
    {
        if ( app_buf_len > ( sizeof ( GNSS14_RSP_GNGGA ) + GNSS14_GNGGA_ELEMENT_SIZE ) ) 
        {
            gnss14_parser_application( app_buf );
        }
    }
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

static void gnss14_clear_app_buf ( void ) 
{
    memset( app_buf, 0, app_buf_len );
    app_buf_len = 0;
}

static err_t gnss14_process ( gnss14_t *ctx ) 
{
    int32_t rx_size = 0;
    char rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
    if ( GNSS14_DRV_SEL_UART == ctx->drv_sel )
    {
        rx_size = gnss14_generic_read( ctx, rx_buf, PROCESS_BUFFER_SIZE );
    }
    else if ( ( GNSS14_DRV_SEL_I2C == ctx->drv_sel ) )
    {
        if ( GNSS14_OK == gnss14_generic_read( ctx, rx_buf, 1 ) )
        {
            if ( GNSS14_DUMMY != rx_buf[ 0 ] )
            {
                rx_size = 1;
            }
        }
    }
    if ( rx_size > 0 ) 
    {
        int32_t buf_cnt = 0;
        if ( ( app_buf_len + rx_size ) > PROCESS_BUFFER_SIZE ) 
        {
            gnss14_clear_app_buf(  );
            return GNSS14_ERROR;
        } 
        else 
        {
            buf_cnt = app_buf_len;
            app_buf_len += rx_size;
        }
        for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ ) 
        {
            if ( rx_buf[ rx_cnt ] ) 
            {
                app_buf[ ( buf_cnt + rx_cnt ) ] = rx_buf[ rx_cnt ];
            }
            else
            {
                app_buf_len--;
                buf_cnt--;
            }
        }
        return GNSS14_OK;
    }
    return GNSS14_ERROR;
}

static void gnss14_parser_application ( char *rsp )
{
    char element_buf[ 100 ] = { 0 };
    if ( GNSS14_OK == gnss14_parse_gngga( rsp, GNSS14_GNGGA_LATITUDE, element_buf ) )
    {
        static uint8_t wait_for_fix_cnt = 0;
        if ( strlen( element_buf ) > 0 )
        {
            log_printf( &logger, "\r\n Latitude: %.2s degrees, %s minutes \r\n", element_buf, &element_buf[ 2 ] );
            gnss14_parse_gngga( rsp, GNSS14_GNGGA_LONGITUDE, element_buf );
            log_printf( &logger, " Longitude: %.3s degrees, %s minutes \r\n", element_buf, &element_buf[ 3 ] );
            memset( element_buf, 0, sizeof( element_buf ) );
            gnss14_parse_gngga( rsp, GNSS14_GNGGA_ALTITUDE, element_buf );
            log_printf( &logger, " Altitude: %s m \r\n", element_buf );
            wait_for_fix_cnt = 0;
        }
        else
        {
            if ( wait_for_fix_cnt % 5 == 0 )
            {
                log_printf( &logger, " Waiting for the position fix...\r\n\n" );
                wait_for_fix_cnt = 0;
            }
            wait_for_fix_cnt++;
        }
        gnss14_clear_app_buf(  );
    }
}

// ------------------------------------------------------------------------ END

额外支持

资源

喜欢这个项目吗?

'购买此套件' 按钮会直接带您进入购物车,您可以在购物车中轻松添加或移除产品。