cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Interrupts prevent program from entering loop

yifan115
Associate II
Posted on July 31, 2014 at 22:05

Hi everybody,

I'm using TIM1 to output pwm signal at 50kHz. I have a deal loop while(1) and some code inside the dead loop at the end of my program. If I setup and enable a timer1 interrupt, for example TIM1 Update Interrupt, the loop will never be entered and the code inside the loop will never be executed. I have cleared the interrupt pending bit in the interrupt, and the code inside the interrupt will not take a long time to execute, so it should be finished before the next interrupt.

I really appreciate your help, thank you!

1 REPLY 1
Posted on July 31, 2014 at 22:16

CPU/NVIC seem to disagree.

Use a Debugger, and figure out where the processor is executing code.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..