GPSProvider wrapper library for STMicroelectronics' X-NUCLEO-GNSS1A1 Expansion Board.
X_NUCLEO_GNSS1A1 Library
GPS_Provider wrapper library for STMicroelectronics' X-NUCLEO-GNSS1A1 component.
Overview
This library includes drivers for ST’s Teseo-LIV3F Global Navigation Satellite System (GNSS) device and middleware for the NMEA protocol support. This firmware package implements the port of the GPS_Provider to STMicroelectronics' X-NUCLEO-GNSS1A1 GNSS Expansion Board.
The key features of the library are:
- Complete software to build applications using Teseo-LIV3F GNSS device
- Middleware for the NMEA protocol support
Furthermore the library provides the following advanced features:
- Geofencing - allows the Teseo-LIV3F receiver to raise a NMEA message when the resolved GNSS position is close to or entering or exiting from a specific circle
- Odometer - provides information on the traveled distance using only the resolved GNSS position
- Data Logging - allows the Teseo-LIV3F receiver to save locally on the flash the resolved GNSS position to be retrieved on demand from the Host
Hardware description
The X-NUCLEO-GNSS1A1 is a Global Navigation Satellite System Expansion Board usable with the STM32 Nucleo system and other Arduino compatible platforms. It is designed around the STMicroelectronics Teseo-LIV3F GNSS receiver IC working on multiple constellations (GPS/Galileo/Glonass/BeiDou/QZSS).
The Teseo-LIV3F module is designed for top performance in a minimal space. Within its 10x10mm compact size, Teseo-LIV3F offers superior accuracy thanks to the on board 26MHz Temperature Compensated Crystal Oscillator (TCXO) and a reduced Time To First Fix (TTFF) relying to its dedicated 32KHz Real Time Clock (RTC) oscillator.
The X-NUCLEO-GNSS1A1, hosting the Teseo-LIV3F, is compatible with Arduino UNO R3 connector layout and interfaces with the MCU via the UART channel. To connect by serial port the GNSS receiver and the host the following parameters must be used:
- 8 data bits
- No parity
- 1 stop bit
- 9600 bauds
A GPS/GLONASS/Beidou antenna, distributed along with the X-NUCLEO-GNSS1A1 Expansion Board, must be connected to the antenna connector present on the Expansion Board. For the X-NUCLEO-GNSS1A1 proper operations, the following jumper settings must be used:
- J2 open
- J3 closed
- J4 closed
- J5 open
- J6 closed
- J7 closed
- J8 open
- J9 closed
- J10 open
- J11 closed
- J12 closed
- J13 closed
- J14 closed
- J15 closed
Tested platforms
This firmware has been tested on STM32 NUCLEO-F401RE
Example Application
To run GNSS example applications using X-NUCLEO-GNSS1A1 Expansion Board based on mbed OS, please refer to TeseoLocation page.
Diff: Components/Teseo/Teseo.h
- Revision:
- 5:1fe1ba1f0013
- Parent:
- 3:2d568ec8da14
diff -r 9d0addf682f0 -r 1fe1ba1f0013 Components/Teseo/Teseo.h --- a/Components/Teseo/Teseo.h Thu Feb 14 11:37:40 2019 +0000 +++ b/Components/Teseo/Teseo.h Thu Jan 14 09:29:14 2021 +0000 @@ -61,16 +61,6 @@ #define LOC_OUTPUT_NMEA (2) #define LOC_OUTPUT_PSTM (3) -#if 1 -#define TESEO_LOG_INFO(...) -#else -#define TESEO_LOG_INFO(...) { \ - if (_serialDebug != NULL) { \ - (_serialDebug->printf(__VA_ARGS__)); \ - } \ - } -#endif - /** * @brief Constant that indicates the maximum number of nmea messages to be processed. */ @@ -193,8 +183,7 @@ PinName _uartRx; PinName _uartTx; - Serial *_uart; - Serial *_serialDebug; + BufferedSerial *_uart; I2C *_i2c; tTeseoData pData; @@ -232,15 +221,12 @@ * GPIO pin for serial Tx channel between the host and the GNSS controller. * @param [in] uartRxPin * GPIO pin for serial Rx channel between the host and the GNSS controller. - * @param [in] serialDebug - * The debug port for diagnostic messages; can be NULL. */ Teseo(PinName resetPin, PinName wakeupPin, PinName ppsPin, PinName uartTxPin, - PinName uartRxPin, - Serial *serialDebug = NULL); + PinName uartRxPin); /** Constructor: Teseo * Create the Teseo, accept specified configuration @@ -257,16 +243,13 @@ * GPIO pin for serial Rx channel between the host and the GNSS controller. * @param [in] i2cBus * I2C Bus not supported yet. - * @param [in] serialDebug - * The debug port for diagnostic messages; can be NULL. */ Teseo(PinName resetPin, PinName wakeupPin, PinName ppsPin, PinName uartTxPin, PinName uartRxPin, - I2C *i2cBus, - Serial *serialDebug = NULL); + I2C *i2cBus); /** Register output callback and event callback functions * @param app_output_cb Teseo class output the location and satellite information to application @@ -327,8 +310,8 @@ virtual gps_provider_error_t resetOdo(void); void _InitUART(int br = STD_UART_BAUD); - void _ResetFast(Serial *serialDebug = NULL); - void _Reset(Serial *serialDebug = NULL); + void _ResetFast(void); + void _Reset(void); void _SendString(char *buf, int len); int _WakeUp(); int _CRC(char *buf, int size);