stm32wb55 avoid exit from sleep mode with TIM2 is active
Hello everybody, I am working with a stm32wb55 and in my application I need to send the microcontroller to sleep for 5 second, wake up, perform some actions and go back to sleep.
I send the micro to sleeomode using the function HAL_PWR_EnterSLEEPMode and then I use the RTC wakeup to exit the sleep mode.
However, I also need to trigger an external watchdog every 200ms, and to do this I set TIM2 to generate an interrupt every 200ms and send a pulse to the external watchdog.
The problem is that, due to the interrupt generated by TIM2, the system exits sleepmode every 200ms and I want to avoid that. ideally, I would like to send the micro to sleep and keep the TIM2 active without waking the system up.
Is there any way to do that?
Thank you.
