Download Print this page
STMicroelectronics STM32Cube Quick Start Manual
STMicroelectronics STM32Cube Quick Start Manual

STMicroelectronics STM32Cube Quick Start Manual

Function pack for iot tracker node with lora connectivity, gnss and sensors
Hide thumbs Also See for STM32Cube:

Advertisement

Quick Links

Quick Start Guide
STM32Cube function pack for IoT tracker node with
LoRa connectivity, GNSS and sensors
(FP-ATR-LORA1)
Version 1.3 (May 27, 2019)

Advertisement

loading
Need help?

Need help?

Do you have a question about the STM32Cube and is the answer not in the manual?

Questions and answers

Summary of Contents for STMicroelectronics STM32Cube

  • Page 1 Quick Start Guide STM32Cube function pack for IoT tracker node with LoRa connectivity, GNSS and sensors (FP-ATR-LORA1) Version 1.3 (May 27, 2019)
  • Page 2 Quick Start Guide Contents FP-ATR-LORA1: STM32Cube function pack for IoT tracker node with LoRa connectivity, GNSS and sensors Hardware and Software overview Setup & Demo Examples Documents & Related Resources STM32 Open Development Environment: Overview...
  • Page 3: Hardware Overview

    Hardware Overview FP-ATR-LORA1: STM32Cube function pack for IoT tracker node with LoRa connectivity, GNSS and sensors is available for two platforms: modular and integrated. X-NUCLEO-IKS01A2 LSM6DSL LPS22HB HTS221 X-NUCLEO-GNSS1A1 LIV-3F (TESEO III)
  • Page 4 To help users setting up a complete node (LoRaWAN™, Sigfox™, or both), the B-L072Z-LRWAN1 Discovery kit comes with the STM32 comprehensive free software libraries and examples available with the STM32Cube package, as well as a direct access to the Arm® Mbed Enabled™ resources at the http://mbed.org website.
  • Page 5 GNSS expansion board Hardware Overview X-NUCLEO-GNSS1A1 Hardware Description • The X-NUCLEO-GNSS1A1 expansion board is based on the Teseo- LIV3F tiny GNSS module. • It represents an affordable, easy-to-use, global navigation satellite system (GNSS) module, embedding a Teseo III single die standalone positioning receiver IC, usable in different configurations in your STM32 Nucleo project.
  • Page 6 Motion MEMS and environmental sensors expansion board Hardware Overview X-NUCLEO-IKS01A2 Hardware Description • The X-NUCLEO-IKS01A2 is a motion MEMS and environmental sensor evaluation board system. • It is compatible with the Arduino UNO R3 connector layout, and is designed around ST’s latest sensors. Key Product on board LSM6DSL MEMS 3D accelerometer (±2/±4/±8/±16 g) + 3D...
  • Page 7 STEVAL-STRKT01 evaluation board Hardware Overview STEVAL-STRKT01 Hardware Description • The STEVAL-STRKT01 LoRa® IoT tracker is designed and optimized to implement the latest technologies in IoT tracker applications such as asset, people and animal tracking as well as fleet management. Thanks to the STM32L072CZ embedded in the CMWX1ZZABZ-091 LoRa®...
  • Page 8 STEVAL-STRKT01 evaluation board Hardware Overview Key Products on board • CMWX1ZZABZ • LoRaTM module based on high-performance and low power ARM® Cortex®-M0 32-bit STM32L072 and SX1276 Semtech LoRa transceiver • TESEO-LIV3F • GNSS standalone module based on TESEO III • STBC02 •...
  • Page 9: Software Overview

    FP-ATR-LORA1 FP-ATR-LORA1 Software Description Software Overview FP-ATR-LORA1 is an STM32Cube function pack which lets you read data from environmental and motion sensors, retrieve geo- position from GNSS and send collected data via LoRaWAN connectivity. Overall Software Architecture The package implements low power profiles and related transitions to ensure long battery autonomy.
  • Page 10 Quick Start Guide Contents FP-ATR-LORA1: STM32Cube function pack for IoT tracker node with LoRa connectivity, GNSS and sensors Hardware and Software overview Setup & Application Examples Documents & Related Resources STM32 Open Development Environment: Overview...
  • Page 11 Setup & Applications Examples HW prerequisites for STM32 Nucleo (1/2) • When using the LoRa IoT Tracker: • 1 x LoRa IoT Tracker (STEVAL-STRKT01) STEVAL-STRKT01 • 1 x Type-C cable (LoRa IoT Tracker) • 1 x ST-LINK/NUCLEO BOARD • Alternatively, when using the Discovery Kit LoRa: •...
  • Page 12 FP-ATR-LORA1 hardware setup on STM32 discovery and Expansion boards X-NUCLEO-GNSS1A1 GNSS B-L072Z-LRWAN1 X-NUCLEO-IKS01A2 MEMS...
  • Page 13 FP-ATR-LORA1 hardware setup on STM32 discovery and Expansion boards Important hardware setup information • On the X-NUCLEO-GNSS1A1 expansion board • the following jumpers must be open: J3, J5, J6, J7, J8 and J10. • the following jumpers must be closed: J2, J4, J9, J11, J12, J13, J14 and J15. •...
  • Page 14 FP-ATR-LORA1 hardware setup on STEVAL-STRKT01 STEVAL-STRKT01 system start up • Connect LoRa Antenna into J101 and assembly the board as follow • Power on • Push SW400 (more than 1.25s) • Or plug USB cable SW400...
  • Page 15 FP-ATR-LORA1 hardware setup on STEVAL-STRKT01 STEVAL-STRKT01 system start-up Programming procedure: • Use Nucleo board (e.g. NUCLEO-F401RE) • Connect CN4(SWD) to CN501 of STEVAL-STRKT01 (by 5 poles cable or by plugging directly on the STlink connector. (Pin1 CON4 of ST-LINKV2 has to be connected to Pin5 CON 501 of STEVAL-STRKT01).
  • Page 16 Setup & Application Examples Software and Other prerequisites • STM32 ST-Link Utility • Download and install STSW-LINK004 from www.st.com • FP-ATR-LORA1 • Download FP-ATR-LORA1 package from www.st.com • copy the .zip file content into a folder on your PC. • The package contains binaries and source code with project files for several IDEs (Keil, IAR, System...
  • Page 17 FP-ATR-LORA1. Sample applications Start coding in just a few minutes www.st.com/stm32ode-fp FP-ATR-LORA1 package structure Docs www.st.com BSP, HAL and drivers Select part number: LoRa ,GNSS and USB 2.0 libs FP-ATR-LORA1 Download & unpack Asset_Tracker sample application; pre-compiled binaries Visualize results on serial interface Register on Loriot to obtain AppEUI and AppKey, copy them in source code and recompile the project according to the selected IDE...
  • Page 18 FP-ATR-LORA1: Step by step setup Launch sample application. Use pre-compiled binaries • Pre-compiled binary can be found at • B-L072Z-LRWAN1 discovery kit Projects\B-L072Z-LRWAN1\Applications\LoRa\Asset_Tracker\Binary\mlm32l07x01.bin • STEVAL-STRKT01 evaluation board • Entire application FP-ATR-LORA1 for EU region (868MHz) Projects\STEVAL-STRKT01\Applications\LoRa\Asset_Tracker\Binary\STEVAL_STRKT01_868.bin • Entire application FP-ATR-LORA1 for US region (915MHz) Projects\STEVAL-STRKT01\Applications\LoRa\Asset_Tracker\Binary\STEVAL_STRKT01_915.bin •...
  • Page 19 FP-ATR-LORA1: Step by step setup Launch sample application. Configure Serial Terminal • Open serial terminal then configure baud rate speed to 115200 (Setup  Serial port in TeraTerm). • Also set transmit delays to a value bigger than zero, like 10.
  • Page 20 FP-ATR-LORA1: Step by step setup Launch sample application. Configure Serial Terminal • In Terminal configuration (Setup  Terminal in TeraTerm) enable Local Echo and set newlines to AUTO for Receive and CR+LF for Transmit.
  • Page 21 FP-ATR-LORA1: Step by step setup Launch sample application • On first run, take note of the unique DevEUI string, which will be used later. • AppEui and AppKey strings will be set later.
  • Page 22 FP-ATR-LORA1: Step by step setup Launch sample application • Connect to the LoRa gateway by either serial interface (with settings 115200 N81) or web interface and take note of the device MAC address, which will be used later.
  • Page 23 FP-ATR-LORA1: Step by step setup Create Loriot account • Register a free account on one of the Loriot servers at https://www.loriot.io...
  • Page 24 FP-ATR-LORA1: Step by step setup Loriot dashboard Gateways Applications widget widget...
  • Page 25 FP-ATR-LORA1: Step by step setup LoRa gateway setup (1/4) • From the dashboard, create a new network (see slide #26). • Enroll a new gateway by clicking on “Add gateway to Network” (see slide #27). • Select your gateway model from the list (suggested: Multitech Conduit). •...
  • Page 26 FP-ATR-LORA1: Step by step setup LoRa gateway setup (2/4)
  • Page 27 FP-ATR-LORA1: Step by step setup LoRa gateway setup (3/4)
  • Page 28 FP-ATR-LORA1: Step by step setup LoRa gateway setup (4/4) • Detailed installation instructions for each gateway model are provided by clicking the “Documentation” button in the dashboard, and then under the “Setup guides” link.
  • Page 29 FP-ATR-LORA1: Step by step setup Application and device setup • Create an application by clicking on the plus sign in the Applications widget in the Loriot dashboard. • Locate the “Application ID” string and take note, this is the “Application EUI” string. •...
  • Page 30 FP-ATR-LORA1: Step by step setup Application output setup...
  • Page 31 FP-ATR-LORA1: Step by step setup Device page...
  • Page 32 FP-ATR-LORA1: Step by step setup Select B-L072-LRWAN1 or STEVAL-STRKT01 project • Set LoRa keys at runtime, avoiding project rebuild; the keys are stored in the board’s EEPROM for subsequent use. • To do this, use the following commands on serial interface: •...
  • Page 33 FP-ATR-LORA1: Step by step setup Select B-L072-LRWAN1 or STEVAL-STRKT01 project • As an alternative, edit the project file to add the keys manually Lorawan/App/inc/Commissioning.h in the project related to your hardware (B-L072Z-LRWAN1 or STEVAL-STRKT01) • Copy the AppEUI key after the #define LORAWAN_JOIN_EUI •...
  • Page 34 FP-ATR-LORA1: Step by step setup Cayenne sign in • Create a new free account on Cayenne website at https://cayenne.mydevices.com/cayenne/signup...
  • Page 35 FP-ATR-LORA1: Step by step setup Add new LoRa device (1/2) • Create a new device by clicking on “Add new…” and “Device” • Select device class LoRa / Loriot. • Browse the devices list and select “STM32 B-L072Z-LRWAN1”.
  • Page 36 FP-ATR-LORA1: Step by step setup Add new LoRa device (2/2) • Enter DevEUI string • Select the Loriot server used for registration • Add Loriot AppID from “Application ID” in Loriot dashboard • Add Loriot token which can be found by clicking on “Access tokens”...
  • Page 37 FP-ATR-LORA1: Step by step setup Add new LoRa device (2/2)
  • Page 38 FP-ATR-LORA1: Step by step setup Run application • Trigger a LoRa message send by either MEMS event (shake the boards), by pushing user button or by timer. • Send environmental sensors data, accelerometer axes and geo-position to LoRaWAN network. • Leave the board static to switch to Low Power and Ultra Low Power states.
  • Page 39 FP-ATR-LORA1: Step by step setup Display data on Cayenne dashboard...
  • Page 40 Quick Start Guide Contents FP-ATR-LORA1: STM32Cube function pack for IoT tracker node with LoRa connectivity, GNSS and sensors Hardware and Software overview Setup & Demo Examples Documents & Related Resources STM32 Open Development Environment: Overview...
  • Page 41 All documents are available in the DESIGN tab of the related products webpage FP-ATR-LORA1: • DB3715: STM32Cube function pack for IoT tracker node with LoRa connectivity, GNSS and sensors – data brief • UM2487: Getting started with STM32Cube function pack for IoT tracker node with LoRa connectivity, GNSS and sensors –...
  • Page 42 Fast, affordable Prototyping and Development • The STM32 Open Development Environment (ODE) consists of a set of stackable boards and a modular open SW environment designed around the STM32 microcontroller family. STM32 Nucleo STM32Cube expansion boards development software (X-NUCLEO) STM32Cube...
  • Page 43 STM32 Nucleo Development Boards (NUCLEO) • A comprehensive range of affordable development boards for all the STM32 microcontroller series, with unlimited unified expansion capabilities and integrated debugger/programmer functionality. Power supply STM32 microcontroller through USB or external source Integrated debugging Complete product range and programming from ultra-low power to high-performance ST-LINK probe...
  • Page 44 STM32 Nucleo Expansion Boards (X-NUCLEO) • Boards with additional functionality that can be plugged directly on top of the STM32 Nucleo development board directly or stacked on another expansion board. Connect Power Move/Actuate Interact Sense Motion MEMS sensors Environmental sensors DIL24 support for new devices Example of STM32 expansion board (X-NUCLEO-IKS01A1)
  • Page 45: Software Components

    ST. These include Eclipse-based IDEs such as Ac6 System Workbench for STM32 and the MDK-ARM environment. www.st.com/stm32cube OPEN LICENSE MODELS: STM32Cube software and sample applications are covered by a mix of fully open source BSD license and ST licenses with very permissive terms. www.st.com/x-cube...
  • Page 46 STM32 Open Development Environment Building block approach The building blocks Your need Our answer Accelerometer, gyroscope Inertial modules, magnetometer COLLECT Sense Pressure, temperature, humidity Proximity, microphone TRANSMIT Bluetooth LE, Sub-GHz radio Connect NFC, Wi-Fi, GNSS Audio amplifier ACCESS Touch controller Translate Operation Amplifier CREATE...