2018-08-03 10:47 PM
Hello,
I am using timer 6 and generating interrupts for every 1s.
it works fine when i dont enable the sleep on exit feature.
but if i enable sleep on exit feature, after the first timer interrupt , processor goes to sleep and the next timer interrupt unable to wake up the processor. the timer isr doesnt run. Please help
Solved! Go to Solution.
2018-08-10 10:20 PM
Hi Thank you
Actually i found out the issue,
before starting the timer , i made TIM6->SR = 0 ,
so, basically whats happening was , before going to sleep , some spurious interrupts of TIM6 triggered and after exit processor went to sleep without starting the timer.
2018-08-09 06:23 PM
"STM32" covers hundreds of parts over dozens of families, please try to be specific. Perhaps even provide code you're actually trying so specific issues can be identified, or staff can actually compile and check.
2018-08-10 07:43 AM
Hello @RN ,
Please make sure to enable the Timer6's clock during Low Power (Sleep) mode:
__HAL_RCC_TIM6_CLK_SLEEP_ENABLE();
Khouloud.
2018-08-10 10:20 PM
Hi Thank you
Actually i found out the issue,
before starting the timer , i made TIM6->SR = 0 ,
so, basically whats happening was , before going to sleep , some spurious interrupts of TIM6 triggered and after exit processor went to sleep without starting the timer.