STM8L050J3 wfe() wakeup using TIM2 timer.
Good morning. I've been trying for a while to put the MCU in low power with the wfe() instruction and wake it up with TIME2 but the MCU gets stuck in wfe() and doesn't wake up. With the debugger active it seems to work even if it doesn't respect the times of the TIM2 counter.
Does anyone have an example or a template to study to understand what I'm doing wrong?
Thanks from now to anyone who can help me.
