AnsweredAssumed Answered

HAL_Delay() causes infinite loop in some cases

Question asked by Rob Keck on Feb 2, 2017
Latest reply on Feb 3, 2017 by Rob Keck

Hey there, I am relatively new to STM32 Development (coming from an AVR Background).

I am currently working on a LoRaWAN sample project using the STM32L053 Discovery board and the SX1272 Modem with IBM LMiC Library. According to the Docs i have implemented all needed functions.

So there is this function i have to implement: void hal_waitUntil(uint32_t time).

So i just call HAL_Delay(time) inside the function. But if I run the code on the controller the delay never exits.

Getting the Systick Value with GDB or PRINTF shows, that the systick isn't increasing anymore after entering the delay. But if I call HAL_Delay() somewhere in the main.c it works without problems (so the systick must work).

 

I attached my eclipse project. 

In the src folder there are main.c, hardware.c (where i init the peripherals) and hal.c (where the LMiC functions are declared).

 

Would be awesome if someone could help me I'm hangin' there for days...

Attachments

Outcomes