cancel
Showing results for 
Search instead for 
Did you mean: 

stm32wba65 and I-CUBE-LRWAN

SLevi.1
Associate III

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.

3 REPLIES 3
Andrew Neil
Super User

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?

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.

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?

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

 

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.