cancel
Showing results for 
Search instead for 
Did you mean: 

Timer interrupt does not wake up the processor

RN
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
RN
Senior

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.

View solution in original post

3 REPLIES 3

"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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Khouloud GARSI
Lead II

Hello @RN​ ,

Please make sure to enable the Timer6's clock during Low Power (Sleep) mode:

__HAL_RCC_TIM6_CLK_SLEEP_ENABLE();

Khouloud.

RN
Senior

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.