STM32l4 doesn't quit STOP2 mode if not debugging
Hello STM32-Community,
right before finishing work and everything working arguably fine, I was trying to measure the power consumption of my periphery, where I could see that the program stopped working. I've pinned down the problem to not reentering the program schedule after entering STOP2 if the program is not currently debugging.
Thats my currently test set up. It happily blinks while debugging, but restarting the microcontroller does not make it blink anymore. But it works with STOP1 mode. Any tips how to resolve this issue?
#define LORA_TIME 10
while(1)
{
HAL_GPIO_TogglePin(LED_1_GPIO_Port, LED_1_Pin);
HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, LORA_TIME*32000/32768);
RTC_WAKEUPCLOCK_CK_SPRE_16BITS); //
HAL_SuspendTick();
HAL_PWREx_EnterSTOP2Mode(PWR_SLEEPENTRY_WFI);
HAL_ResumeTick(); //not needed most likely
}Kind regards and thank you in advance
crackl1ng
