Will a software timer fire when started in isr during sleep?

I send my µC to sleep without any software timer running. Then an edge on an input pin triggers an interrupt and in its isr I start a software timer, then finish the isr. Will the timer fire in time? Will µC go to sleep again when isr is finished?
Thanks for any help
Martin

If you’re using tickless idle, then yes the timer will work as expected. After your ISR, the MCU doesn’t go right back to sleep. Instead, the tickless logic re-enables the scheduler and the timer task gets the timer started. Once the idle task gets control again, the tickless idle logic will put the MCU back to sleep.

Hi Jeff,
yes, I am using tickless.
Also I forgot to mention, that I am using an STM32G0B0 which is a Cortex-M0+ and FreeRTOS 10.5.1
One more question:
You mentioned that idle tasks gets control again and puts MCU back to sleep. But this time it will take into account that there is a timer running and will configure the system so that it will wake up in time, right? What precisely will wake up the MCU? I think it must be some kind of hardware, the sys-tick-timer?
Thanks for some explanation.
Martin

Yes that’s right.

Usually SysTick, yes. The tickless logic determines when the next task will be ready to execute (in this case, it is the timer task) and configures SysTick accordingly. But users can develop their own implementation of the timing part of tickless idle, so other implementations might use a different timer to wake the system at the right time.

I will answer your other post but you will likely want to use xTimerChangePeriodFromIsr() and not the other functions to start the timer.