2025-09-16 2:46 PM - last edited on 2025-09-18 3:46 AM by Amel NASRI
Hello,
I designed a board based on the STM32L031F6P6 with an sx1262 chip, and it worked well using the driver https://github.com/Lora-net/sx126x_driver for LoRa transmission.
I'm trying to send LoRaWAN signals, but I'm having trouble finding examples of LoRaWAN transmission with sx1262 for STM32 platforms.
Does anyone have any tips?
2025-09-18 1:36 AM
@robertcabral wrote:I'm having trouble finding examples of LoRaWAN transmission with sx1262 for STM32 platforms.
The sx1262 neither knows nor cares what microcontroller you use - its operation doesn't change depending on the controller!
The only bit that's specific to a particular microcontroller is setup of IO pins and the SPI controller.
Once you've got that working, the rest is hardware agnostic.
As you say you can do basic LoRa, you must have that part already working...
Semtech provide hardware-independent software on their Product Page:
https://www.semtech.com/products/wireless-rf/lora-connect/sx1262
Having said all that, ST's I-CUBE-LRWAN provides specific support for STM32.
2025-09-18 11:22 AM
Hi Andrew! Thanks for your anwer.
I'm having trouble with the .elf file size.
My MCU has 32kB of flash (STM32L031F6P6), and I managed to get a package with at least 46KB using the BasicMAC library.
I'm having trouble adding I-CUBE-LRWAN; it doesn't appear in the options:
I tried manually adding the .zip file, but got the following error:
Does I-CUBE-LRWAN support STM32L031 family microcontrollers?
I would like to make lorawan sends in abp mode without the need for downlink, but I was unable to further optimize the lmic library for this.
Thanks in advance,
Robert.
2025-09-18 12:53 PM
>>Does I-CUBE-LRWAN support STM32L031 family microcontrollers?
Probably, it supports others in the L0x range, I've seen L07x
I do however anticipate it creating something too big, and a build for the L07x should illustrate this quickly enough. Those parts have 192KB of FLASH in the Murata parts, it doesn't use all that, but I'd suspect a LoRaWAN build with any Hash or Crypto would get a foot-print larger than 32KB
2025-09-18 1:05 PM
@robertcabral wrote:I'm having trouble adding I-CUBE-LRWAN; it doesn't appear in the options:.
It isn't actually a Package like that - it's just a bunch of source files.
You just unzip them.
@robertcabral wrote:Does I-CUBE-LRWAN support STM32L031 family microcontrollers?
It doesn't provide a ready-to-go project - but porting from one of those listed shouldn't be hard.
As @Tesla DeLorean says, try building one of them and see if that'll fit ...