Hello. I want to set one timer for a future event. Then set the stm32L4 to stop 2 and wake it up with the periodic wake up unit. My code is as follows:
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x2710, RTC_WAKEUPCLOCK_RTCCLK_DIV16);
If I remove the line: HAL_LPTIM_Counter_Start_IT(&hlptim1, 65533), then everything works ok, the MCU goes to stop mode, and it wakes up at the correct time given by HAL_RTCEx_SetWakeUpTimer_IT().
The problem arises when I put the LPTIM1 activation counter. Then the MCU does not go into stop mode. Probably there is something in the LPTIM1 counter that prevents the MCU from entering in stop mode.
¿Does anybody know what I should do to use the LPTIMER1 while the MCU being stopped?
Thanks in advance.