I'll appreciate your thoughts on the subject.
I use STM32L476.
Due to high current consumption during run mode, in order to minimize power consumption, I was thinking of using Stop Mode 2 instead of the "regular" sleep mode. Since systick is not active in this mode I'm thinking of setting the LPTIM for 10msec interval (I don't need more frequent interval), and use it as my application tick. HAL tick will stay the regular systick 1msec that will be active only in run mode.
I'm still debating with myself if to work in 80Mhz to further minimize the run mode duration or just raise the clock to 80MHz only when my algorithm executes (once every 1 second).
In the case where the 80Mhz will be used only for the algorithm, the system clock will be MSI 48Mhz.
The thing is that if I use 80Mhz as a constant system clock, I will have to run a function that restores the clock and systick (for the HAL) in every IRQ handler that might wake me from the Stop Mode 2. I assume the power save in 48Mhz and longer execution time is close to the power penalty in 80Mhz and low execution time.
The wake sources from Stop Mode 2 will be EXTI, LPUART and LPTIM.
What do you think?
Another option, since LPTIM using LSE will not be accurate, is to set LPTIM for one shot interrupt prior to entering Stop Mode 2, to wake according to how long is needed for the next systick interrupt. In this case the systick will be set for 10msec, and override the HAL_IncTick function is needed to make sure tha HAL timeouts are working correctly.