2026-02-14 1:32 AM - last edited on 2026-02-27 1:19 AM by Imen.D
Hello,
I am working on a project using the STM32WL55JC1 board. In my base application, UART1 and some I2C peripherals are already configured in the default project structure generated by STM32CubeIDE.
Now I need to add support for both LoRaWAN and proprietary LoRa in the same project.
For LoRaWAN, I am using the example provided in the STM32WL firmware package:
STM32Cube MCU Package for STM32WL series v1.0.0
For proprietary LoRa, I followed the Digi-Key forum guide:
Using the low-level Sub-GHz radio driver for STM32WL series.
My requirement is:
The device should normally operate in LoRaWAN mode.
When specific data is received through UART, the MCU should switch to proprietary LoRa mode.
After handling the proprietary communication, it should return to LoRaWAN mode.
I understand that both LoRaWAN and proprietary LoRa cannot run simultaneously because they share the same radio. However, I am confused about:
How to properly merge the project structures.
Where to place the LoRaWAN and proprietary LoRa source files.
How to manage initialization and switching between the two modes.
Could someone provide a step-by-step procedure or a recommended project structure for implementing this on the STM32WL55JC1?
Any guidance or example projects would be very helpful. Thank you.
2026-02-15 1:13 PM
Hello @riosh10
First, LoRaWAN is based in the LoRa modulation. They are not two communication technologies. Lora can be used for communication between an end node and a gateway for LoRaWAN or between two points (nodes). For P2P applications.
For your case, I think you should have an application similar to the one switching between LoRaWAN and Sigfox context described in this video.
Best Regards.
II
2026-02-16 12:37 AM
Thank you for sharing the video. I will review it carefully.
However, my main difficulty is slightly different.
When I create a fresh STM32CubeIDE project for the STM32WL55JC1 and enable UART or I2C in the .ioc file, the code is generated correctly under Core/Src and Core/Inc as expected.
But when I use the LoRaWAN example project from the STM32WL firmware package (Projects/NUCLEO-WL55JC/Applications/LoRaWAN/LoRaWAN_End_Node/STM32CubeIDE), modifying the .ioc file does not generate peripheral initialization code in the usual way. Even after enabling UART or I2C and regenerating code, I do not see the expected MX_USARTx_Init() or MX_I2Cx_Init() functions being created or updated properly.
Because of this, I am unsure about:
Whether the LoRaWAN example project is intended to be modified using the .ioc file.
If there is a specific procedure required to add peripherals (UART, I2C) to this example.
Whether I should instead start from a clean CubeMX project and manually integrate the LoRaWAN middleware.
Could someone clarify the correct workflow for adding peripherals to the STM32WL LoRaWAN example project while still using CubeMX code generation?
Any guidance on the recommended project structure or best practice would be very helpful.