LoRa-E5-mini: Difference between revisions
Line 80: | Line 80: | ||
* install the STM32 support, add https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | * install the STM32 support, add https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | ||
* choose the right board | * choose the right board | ||
* upgrade the firmware of my stlink2 (tool from ST) | * upgrade the firmware of my stlink2 (tool from ST), currently at V2J38S7 | ||
* run the cubestm environment to use the stlink2 to disable the firmware protection | * run the cubestm environment to use the stlink2 to disable the firmware protection | ||
* flash a simple blinky sketch to the board | * flash a simple blinky sketch to the board |
Revision as of 19:44, 9 October 2021
Project LoRa E5 | |
---|---|
Arduino on the LoRa-E5 module | |
Status | In progress |
Contact | bertrik |
Last Update | 2021-10-09 |
The plan
This page is about the LoRa-E5 module and getting it to work as a LoRaWAN node with Arduino and the BasicMac stack.
- replace the original "AT" firmware with Arduino based firmware
- use the BasicMac library for LoRaWAN
- use platformio as the build system
- create some basic examples for use as a LoRaWAN node on TheThingsNetwork
Interesting post about this module: https://www.disk91.com/2021/technology/lora/lora-e5-the-seeed-studio-stm32-wl-module/
Hardware
The hardware is the LoRa-E5 module from seeed studio, contains the STM32WLE5JC:
- LoRa E5 module (just the chip): https://www.seeedstudio.com/LoRa-E5-Wireless-Module-p-4745.html
- LoRa E5 mini dev board: https://www.seeedstudio.com/LoRa-E5-mini-STM32WLE5JC-p-4869.html
- LoRa E5 wiki page: https://wiki.seeedstudio.com/LoRa-E5_STM32WLE5JC_Module/
- FCC information about the module: https://fccid.io/Z4T-LORA-E5/
Overview of pins used on this board (not completely standard): https://wiki.seeedstudio.com/LoRa_E5_mini/#22-gpio-configuration-overview
Software
https://github.com/bertrik/lora-e5
There appears to be support for various kinds of WL55 boards: https://github.com/stm32duino/Arduino_Core_STM32/blob/main/boards.txt
Support for this board in this archive: https://github.com/dolfandringa/Arduino_Core_STM32/blob/master/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/boards_entry.txt#L62 ???
Development environment
- Install Arduino IDE, from https://www.arduino.cc/en/software
- Add a board URL: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
- Under menu Tools/Board/Boards manager, search for STM32 and install 'STM32 MCU based boards'
- Under menu Tools/Board/STM32 boards, choose 'Generic STM32WL series', then 'Generic STM32WL series'
- Under menu Tools/Board part number, choose Generic WLE5JCIx'
Load the .ino file. Compile with ctrl-R. Upload with ctrl-U.
Programming over SWD
Connect an ST-LINKv2 as follows:
- SWDIO to PA13
- SWCLK to PA14
- GND to GND
Hold BOOT, then press RST and execute:
openocd -s /usr/share/openocd/scripts -f interface/stlink.cfg -f target/stm32wlx.cfg
Result:
Open On-Chip Debugger 0.11.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'. Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 500 kHz Info : STLINK V2J17S4 (API v2) VID:PID 0483:3748 Info : Target voltage: 3.258730 Info : stm32wlx.cpu: hardware has 6 breakpoints, 4 watchpoints Info : starting gdb server for stm32wlx.cpu on 3333 Info : Listening on port 3333 for gdb connections
Or program over serial?
Getting it to work
Got a flashing LED sketch to work:
- install Arduino IDE
- install the STM32 support, add https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
- choose the right board
- upgrade the firmware of my stlink2 (tool from ST), currently at V2J38S7
- run the cubestm environment to use the stlink2 to disable the firmware protection
- flash a simple blinky sketch to the board
Serial port does not work yet, it is connected to PB6/PB7. I need to configure an alternative setting for the pins, don't know exactly how to do that on Arduino.
Node configuration in TheThingsNetwork
The information on the website of Seeed studios is outdated. It refers to the "v2" version of TheThingsNetwork, which is being phased out. It is already impossible to add new nodes on TTNv2, since it was set to read-only.
Nodes should be configured for TheThingsNetwork v3 instead.