2018-12-10 06:36 AM
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.
Solved! Go to Solution.
2018-12-10 01:17 PM
Remove this:
TIM_ITConfig(TIM3, TIM_IT_CC2, ENABLE);
TIM_ITConfig(TIM3, TIM_IT_CC3, ENABLE);
TIM_ITConfig(TIM3, TIM_IT_CC4, ENABLE);
JW
2018-12-10 07:50 AM
You don't handle/clear the CC2-CC4 timer interrupts you've enabled.
JW
2018-12-10 08:00 AM
Sounds like it is stuck in interrupt loop.
Might also want to increase the priority of SysTick so it preempts other sources.
2018-12-10 08:39 AM
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.
2018-12-10 01:17 PM
Remove this:
TIM_ITConfig(TIM3, TIM_IT_CC2, ENABLE);
TIM_ITConfig(TIM3, TIM_IT_CC3, ENABLE);
TIM_ITConfig(TIM3, TIM_IT_CC4, ENABLE);
JW
2018-12-11 12:43 AM
Thank you, now it works. I copied the configuration from a previous project and i didn't notice it.