cancel
Showing results for 
Search instead for 
Did you mean: 

Why, after the first saturation of the timer, the code doesn't enter in the systik handler anymore?

MPero
Associate II

I was trying to write a code to integrate a input signal, triggering the ADC with a timer, and print the information every 0.5 s with the systick. I don't understand why After the first saturation of the timer, the code doesn't enter in the systik handler anymore.

1 ACCEPTED SOLUTION

Accepted Solutions

Remove this:

   TIM_ITConfig(TIM3, TIM_IT_CC2, ENABLE);

   TIM_ITConfig(TIM3, TIM_IT_CC3, ENABLE);

   TIM_ITConfig(TIM3, TIM_IT_CC4, ENABLE);

JW

View solution in original post

5 REPLIES 5

You don't handle/clear the CC2-CC4 timer interrupts you've enabled.

JW

Sounds like it is stuck in interrupt loop.

Might also want to increase the priority of SysTick so it preempts other sources.

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

It's not a systick problem, couse i canceled the systick part e set the print flag with the timer itself, but after 130 prints, it stops to enter even in the main.

Remove this:

   TIM_ITConfig(TIM3, TIM_IT_CC2, ENABLE);

   TIM_ITConfig(TIM3, TIM_IT_CC3, ENABLE);

   TIM_ITConfig(TIM3, TIM_IT_CC4, ENABLE);

JW

Thank you, now it works. I copied the configuration from a previous project and i didn't notice it.