Skip to main content
SLevi.1
Associate III
January 21, 2026
Solved

stm32wba65 and I-CUBE-LRWAN

  • January 21, 2026
  • 2 replies
  • 638 views

I have a custom board with stm32wba65 processor. I also have an RFM95 LoRa module. I need to add LoRaWAN capability. I tried adding I-CUBE-LRWAN into my CubeMX but was not able to load it (not a recognised package).

SLevi1_0-1768993411104.png

How can I get an ST or Semtech approved LoRaWAN stack into my project?

Please do not suggest I use stm32WL processor.

Best answer by Imen.D

Hi @Andrew Neil 

 

I escalated the request to the responsible team for review and to push that the I-CUBE-LRWAN package will be available (Internal ticket number: 225628).

I will post updates here as soon as I have more details.

2 replies

Andrew Neil
Super User
January 21, 2026

Indeed, I-CUBE-LRWAN is not a "Package" in the CubeMX sense.

It's just a load of source code, which you add to your project manually. Or start from one of the supplied examples in it.

 

PS:

See also: I-CUBE-LRWAN Projects do not have .ioc files.

@Imen.D - is there any progress on making that CubeMX version?

 

EDIT: link corrected.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
SLevi.1
SLevi.1Author
Associate III
January 21, 2026

Ok, so I took the example for stm32L476, and copied the LoRaWAN folder across.

How do I specify that we are using:

  1. RFM95 (sx1276) board
  2. stm32WBA65 processor
  3. spi3 for comms
  4. PC13 for CS

Is there a header file to set this up? or do I just edit the .c files directly?

Andrew Neil
Super User
January 21, 2026

The processor you specify in the IDE Project;

The other stuff, as mentioned in the linked thread, is all done in the HAL code.

Yes, there should be (a) header(s); eg, mlm32l0xx_hw_conf.h has:

/* LORA I/O definition */

#define RADIO_RESET_PORT GPIOC
#define RADIO_RESET_PIN GPIO_PIN_0

#define RADIO_MOSI_PORT GPIOA
#define RADIO_MOSI_PIN GPIO_PIN_7

#define RADIO_MISO_PORT GPIOA
#define RADIO_MISO_PIN GPIO_PIN_6

#define RADIO_SCLK_PORT GPIOB
#define RADIO_SCLK_PIN GPIO_PIN_3

#define RADIO_NSS_PORT GPIOA
#define RADIO_NSS_PIN GPIO_PIN_15

#define RADIO_DIO_0_PORT GPIOB
#define RADIO_DIO_0_PIN GPIO_PIN_4

#define RADIO_DIO_1_PORT GPIOB
#define RADIO_DIO_1_PIN GPIO_PIN_1

#define RADIO_DIO_2_PORT GPIOB
#define RADIO_DIO_2_PIN GPIO_PIN_0

#define RADIO_DIO_3_PORT GPIOC
#define RADIO_DIO_3_PIN GPIO_PIN_13

#ifdef RADIO_DIO_4
#define RADIO_DIO_4_PORT GPIOA
#define RADIO_DIO_4_PIN GPIO_PIN_5
#endif

#ifdef RADIO_DIO_5
#define RADIO_DIO_5_PORT GPIOA
#define RADIO_DIO_5_PIN GPIO_PIN_4
#endif

#define RADIO_TCXO_VCC_PORT GPIOA
#define RADIO_TCXO_VCC_PIN GPIO_PIN_12

#define RADIO_ANT_SWITCH_PORT_RX GPIOA //CRF1
#define RADIO_ANT_SWITCH_PIN_RX GPIO_PIN_1

#define RADIO_ANT_SWITCH_PORT_TX_BOOST GPIOC //CRF3
#define RADIO_ANT_SWITCH_PIN_TX_BOOST GPIO_PIN_1

#define RADIO_ANT_SWITCH_PORT_TX_RFO GPIOC //CRF2
#define RADIO_ANT_SWITCH_PIN_TX_RFO GPIO_PIN_2

etc, ...

That was:

I-CUBE-LRWAN_V1.3.1\Projects\B-L072Z-LRWAN1\Applications\LoRa\End_Node\Core\inc\mlm32l0xx_hw_conf.h

 

EDIT: Link corrected.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
January 27, 2026

Also noted in the thread I linked earlier is that the LoRa(WAN) code all comes from Semtech.

So you could try going direct:

"LoRa Basics Modem/Modem-E is an easy-to-use software library that simplifies the development of LoRaWAN® end-nodes in the ISM Sub-GHz and 2.4GHz bands for worldwide interoperability. It provides developers with an event-driven interface at a high level of abstraction. The Software stack is compatible with TS001-LoRaWAN L2 1.0.4 and Regional Parameters RP2-1.0.3 specifications."

https://www.semtech.com/products/wireless-rf/lora-basics-modem 

via: https://www.semtech.com/products/wireless-rf/software-library-protocol-solution

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.