I am using STM32L476.
I want to enter the Stop 2 mode and use LPTIM1 as a Timeout wakeup unit.
The code is written such that the LPTIM1 wakes up the MCU from Stop 2 mode after every second.
The LPTIM1 takes too long to wakeup the MCU for the first time and once it wakes up the system for the first time, the code works fine and wakes up the MCU after very second until another reset.
What might be the problem and how can I fix it?