STM32WLE5x-SX126X-LoRa

所属分类:自然语言处理
开发工具:C
文件大小:44842KB
下载次数:3
上传日期:2023-06-01 10:09:34
上 传 者sh-1993
说明:  LoRa-E5模块中用于驱动SX126X LoRa收音机的库
(Library for driving the SX126X LoRa radio in the LoRa-E5 module)

文件列表:
.clang-format (3214, 2023-06-01)
Creative Commons — Attribution-NonCommercial-ShareAlike 4.0 International — CC BY-NC-SA 4.pdf (114087, 2023-06-01)
LICENSE.md (19128, 2023-06-01)
datacake (0, 2023-06-01)
datacake\payloaddecoder.js (2211, 2023-06-01)
documentation (0, 2023-06-01)
documentation\Layers and their interfaces.drawio (3756, 2023-06-01)
documentation\LoRaWAN-StateMachine.drawio (1357, 2023-06-01)
documentation\application notes (0, 2023-06-01)
documentation\application notes\AN1200.28_MCU_Requirements_for_LoRaWAN_V3.pdf (142456, 2023-06-01)
documentation\application notes\SX126X CAD performance evaluation V2_1.pdf (2115672, 2023-06-01)
documentation\application notes\dm00660451-how-to-build-a-lora-application-with-stm32cubewl-stmicroelectronics.pdf (2206049, 2023-06-01)
documentation\datasheets (0, 2023-06-01)
documentation\datasheets\AmbientLightSensors_AN000104_1-00.pdf (1090747, 2023-06-01)
documentation\datasheets\AmbientLightSensors_AN000170_2-00.pdf (911133, 2023-06-01)
documentation\datasheets\AmbientLightSensors_AN000171_2-00.pdf (1283016, 2023-06-01)
documentation\datasheets\AmbientLightSensors_AN000530_1-00.pdf (425571, 2023-06-01)
documentation\datasheets\SX126X datasheet.pdf (4130184, 2023-06-01)
documentation\datasheets\TSL2591_DS000338_7-00.pdf (994175, 2023-06-01)
documentation\datasheets\UM2642 stm32wl-hal-and-lowlayer-drivers.pdf (37800912, 2023-06-01)
documentation\datasheets\rm0461-stm32wlex-advanced-armbased-32bit-mcus-with-subghz-radio-solution-stmicroelectronics.pdf (25625241, 2023-06-01)
documentation\lora standards (0, 2023-06-01)
documentation\lora standards\LW1.0.4_End_Device_Certification_V1.0.pdf (2279468, 2023-06-01)
documentation\lora standards\LoRaWAN Link Layer Specification v1.0.4.pdf (2167732, 2023-06-01)
documentation\lora standards\RP002-1.0.3-FINAL-1.pdf (1940526, 2023-06-01)
documentation\lora standards\TR007_Developing_LoRaWAN_Devices-v1.0.0.pdf (364042, 2023-06-01)
documentation\lora standards\TS009-LoRaWAN_Certification_Protocol_v1.0.0.pdf (475149, 2023-06-01)
documentation\other (0, 2023-06-01)
documentation\other\An In-depth look at LoRaWAN_ Class A Devices _ DEVELOPER PORTAL.pdf (672153, 2023-06-01)
documentation\other\Bringing a LoRa_-Enabled Device to Market _ DEVELOPER PORTAL.pdf (536771, 2023-06-01)
documentation\other\Device Activation _ DEVELOPER PORTAL.pdf (1708127, 2023-06-01)
documentation\other\Firmware Updates Over-the-Air _ DEVELOPER PORTAL.pdf (195396, 2023-06-01)
documentation\other\How to Ensure Your LoRa_ Packets Are Sent Properly _ DEVELOPER PORTAL.pdf (191987, 2023-06-01)
... ...

# Welcome to STM32WLE5-SX126X-LoRa This is a driver for the **SX126X LoRa radio** inside the **STM32WLE5x**. As part of the development for this Lora End-Node project (https://github.com/Strooom/MuMo-V2-Node-PCB (HW) https://github.com/Strooom/MuMo-v2-Node-SW (SW)) I was looking for a software library for the SX126x and LoRaWAN. Unfortunately, I could not find anything that met my needs. * Semtech's driver is not easy to reuse, mainly because it tries to implement all their radio chips, all LoraWAN versions and all 3 classes (A,B & C) in a single software repository. * Looking into the code, I found that ST had added several workarounds... Why are they needed ? How do they work ? * Inside the code I found numerous code smells, eg. negative values being assigned into unsigned int, etc.. * Initially their code had FUOTA examples, but they were revoked, with the message that they didn't work.. * In demo's from their code I saw people disable ADR, because it didn't work.. * Everything is written in C io. C++ Investigating the existing code, I realised that writing my own driver would take a few months. But trying to reuse the existing code would take much more effort in the long term, and probably never reach the same quality, readability & maintainability. # Requirements - Scope In order to limit the amount of work, and get something working soon, I decided to limit the scope and postpone some non-essential things for later: * only do LoRa - no (G)FSK, long packets, etc * only do LoRaWAN Class A * only do LoRaWAN V1.0.4 * only Activation By Personalization - ABP : DevEUI is taken from the UID*** inside the STM32WLE. DeviceAddress (DevAddr) AppSKey and NwkSKey are generated on TTN 'register end device' console and then programmed via the Node's CLI into the device. * only support region EU-868 * LoRa sync word is fixed to 0x34 and preamble length is fixed to 8 symbols * Support only the minimum set of DR0 - DR5, as a consequence, the bandwidth is always 125 kHz * in the uplink, we don't combine MAC messages with application payload. - MAC messages are sent in the payload on framePort 0 - Application messages are sent on another port * restrict to settings needed by The Things Network, wherever applicable, as this will be the LoRaWAN network provider we will be using. # Things for later * Adaptive Data Rate - ADR : as our gateways are really close (50m), I can probably live with just using SF9 * Over-The-Air Activation - OTAA * Class C when having external power * firmware Update Over The Air - FUOTA : our devices are recharged via a USB-C port. During recharging, we could upgrade the firmware over the USB port * other regions ?? Currently we are field trialling in Belgium, Europe. However one day we may want this sensor-node to travel with the art collection item, and then we must look into supporting other regions. # Application Functionality Some things are needed by the application anyway, so we don't need to repeat them in the SX126 / LoRaWAN driver: * handling of non-volatile storage : there is 128Kbytes of I2C EEPROM on our board. We use it for storing all context that needs to persist beyond a reset and/or battery removal. This storage is also used to store measurements data. * logging / tracing : during development, logging goes to SWD/TRACE port. Afterwards it can be redirected to UART over USB

近期下载者

相关文件


收藏者