cancel
Showing results for 
Search instead for 
Did you mean: 

I-Cube LoRaWan V1.1.2 with STM32L151CC

Jérémy Da Silva
Associate II
Posted on October 12, 2017 at 18:01

Hi everybody,

I made my PCBA with a STM32l151CC and a SX1272 from Semtech in order to make a LoRa Accessory.

I use Cube MX software to configure all the peripheral of my accessory (SPI, ADC, RTC, etc.) and I add all the LoRaWan files of the I-Cube LoRaWan V1.1.2. I tried to send Continuous waves but it doesn't work.

My code is :

int main (void){

   HAL_Init();

  /* USER CODE BEGIN Init */

  /* USER CODE END Init */

  /* Configure the system clock */

  SystemClock_Config();

 

  /* USER CODE BEGIN SysInit */

  /* USER CODE END SysInit */

  /* Initialize all configured peripherals */

  MX_RTC_Init();

  MX_GPIO_Init();

  MX_NVIC_Init();

  MX_SPI2_Init();

  MX_ADC_Init();

  /* Initialize interrupts */

  /* USER CODE BEGIN 2 */

  hardware_init();

 

  HW_Init(); 

   RadioEvents.TxTimeout = OnRadioTxTimeout;

  Radio.Init( &RadioEvents );

  test12 = Radio.Read(0x01);

  Radio.SetTxContinuousWave( 868000000, 20, 65535 );

  test12 = Radio.Read(0x01);

  Radio.Send(NULL,0);

    while (1);

}

But it does not work. When I read the value of the first register, I have 0x08. Any ideas to help me ?

Best regards,

Jérémy

3 REPLIES 3
Posted on October 12, 2017 at 18:10

When porting to a new platform/configuration I tend to prove that it works as a Listener first.

So LoRa-RX, LoRa-RX-TX, then LoRaWAN

Or start with a working LRWAN V1.1.2 example, and merge in the CubeMX stuff.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 12, 2017 at 18:22

I can not use it as a listenener at the moment because I will receive the Gateway tomorrow.

How can I merge it in the cube MX ?

Posted on October 12, 2017 at 18:37

You don't need a gateway, just another device that can beacon or ping at the frequency/settings you want to use. This could be an STM32 LoRa DISCO board, or NUCLEO + SX1272 shield. You need to break things into more testable pieces because if you try to combine everything debugging is going to be intractable.

How would you normally merge code across projects? It needs a clear understanding of the structure of both architectures, and the critical pieces.

CubeMX is going to be using a slightly different system tick method than LRWAN, which uses the RTC.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..