2026-01-21 3:05 AM
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).
How can I get an ST or Semtech approved LoRaWAN stack into my project?
Please do not suggest I use stm32WL processor.
2026-01-21 3:24 AM - edited 2026-01-21 3:31 AM
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?
2026-01-21 3:43 AM
Ok, so I took the example for stm32L476, and copied the LoRaWAN folder across.
How do I specify that we are using:
Is there a header file to set this up? or do I just edit the .c files directly?
2026-01-21 4:04 AM
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