cancel
Showing results for 
Search instead for 
Did you mean: 

SysTick_Handler not firing in STM32CubeExpansion_LRWAN_V1.3.0 End_Node example!

CraigORV
Associate II

I started messing around with the End_Node example with my B-L072Z-LRWAN1 board, and enabled the sensors despite not having the nucleo board to test with. Curiously I noticed instead of delivering an error, it just locked up.

After some investigation I realised that it was hanging in an infinite loop, waiting for an I2C timeout that never comes. The timeout counter seems to be determined by the HAL_GetTick() function, which in turn has its variable incremented by the SysTick_Handler.

Having placed a breakpoint on this function I can see that it never fires, leaving anything that relies on it for a timeout stuck indefinitely.

I set up a quick empty project in CubeMX and it seems to be called absolutely fine. Changing the TICK_INT_PRIORITY in the example doesn't seem to do anything to fix it either.

So why is the SysTick_Handler not being called? How do I fix this?

I'm running the End_Node example from STM32CubeExpansion_LRWAN_V1.3.0 in keil uVision 5.

3 REPLIES 3

Doesn't the code use the RTC interrupt to mark and simply not start SysTick in HAL_Init() or wherever?​

You can start it, but presumably there would be low power mode issues you'd have to address.​

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

In the example, the HAL_init() function states that the SysTick is used as the time base source.

  /* Use SysTick as time base source and configure 1ms tick (default clock after Reset is MSI) */
  if (HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK)
  {
    status = HAL_ERROR;
  }
  else
  {
    /* Init the low level hardware */
    HAL_MspInit();
  }

I'm still getting my head around development on the STM32, so I may be missing something. But I do know that the I2C transactions never time out because the HAL tick isn't incremented for some reason.

CraigORV
Associate II

Anyone?