STM32 LoRa Discovery Kit: First Steps

From Embedded Lab Vienna for IoT & Security
Jump to: navigation, search


STMicroelectronics B-L072Z-LRWAN1 STM32 LoRa Discovery Board is a development tool to learn and develop solutions based on LoRa and/or FSK/OOK technologies. This tool features an all-in-one open module solution (by Murata), which is the smallest and cheapest on the market, to address wide area network (LPWAN) wireless modules that support the LoRaWAN long range wireless protocol. The Discovery board comes with the certified embedded software (I-CUBE-LRWAN) to provide the means to set up a complete LoRaWAN node. The I-CUBE-LRWAN is LoRaWAN class A certified and sustains the Class C.

  • STM32-LoRa-Disco-Overview


 ➥ Embedded ultra low power STM32L072CZ series MCUs based on ARM Cortex -M0+ core

 ➥ 192 Kbytes of flash memory, 20 Kbytes of RAM, 20 Kbytes of EEPROM

 ➥ 4-channel, 12bit ADC, 2 x DAC, USB 2.0 FS & 157dB maximum link budget

 ➥ Low RX current of 10mA, 200nA register retention & preamble detection

 ➥ System requirements are Windows OS (XP, 7, 8, 10), Linux or macOS and USB type-A to Micro-B cable

Hardware block diagramm

  • STM32-LoRa-Hardware-block-Diagramm

Configuring STM32 LoRa Discovery Kit

Now, we will programm the STM32 LoRa Discovery Kit B-L072Z-LRWAN1 and the Nucleo Expansion (X-NUCLEO-IKS01A1) as the Node device.
and start Keil uVision.

 ➥ On Keil, click Project > Open > Open Project..., select the project inside the unzipped I-CUBE-LRWAN

 ➥ STM32CubeExpansion_LRWAN_V1.3.1\Projects\B-L072Z-LRWAN1\Applications\LoRa\End_Node\MDK-ARM

 ➥ The original demo was originally set to the european frequency 868MHz so we'll need to modify it to work on the 915MHz frequency.
   Right-click on the project and select "Options for Target 'mlm32l07x01' ..."

  • STM32CubeExpansion_LRWAN_V1.3.1_Projects

 ➥ Select the "C / C ++" tab, change "REGION_EU868" to "REGION_US915" and add the define "X_NUCLEO_IKS01A1". Click OK to proceed.

  • STM32-LoRa-Step2

 ➥ Right-click on "Drivers/BSP/X_NUCLEO_IKS01A2" > Options for Group...

  • STM32-LoRa-Step3

 ➥ Uncheck "Include in Target Build". Click Ok.

  • STM32-LoRa-Step4

 ➥ Then right-click on "Drivers/BSP/X_NUCLEO_IKS01A1" > Options for Group...

  • STM32-LoRa-Step5

Check "Include in Target Build". Click Ok.

  • STM32-LoRa-Step6

 ➥ Open the file "Commissioning.h"

  • STM32-LoRa-Step7

 ➥ Make the following code changes on line 77:


line 89:

  • STM32-LoRa-Step8

and line 122:

  • STM32-LoRa-Step9

Used Hardware

 ➠ STM32 LoRa and Sigfox Discovery kit

 ➠ X-NUCLEO-IKS01A2 nucleo expansion board