cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between timer interrupts?

GunkutA
Senior

Hello when I enter NVIC settings for timer interrupt, there are different interrupts for TIM1. Such as: TIM1 break interrupt, TIM1 update interrupt, TIM1 trigger and commutation interrupts and TIM1 capture and compare interrupt. What is the difference between these interrupts? I want to use timer 1 as global timer interrupt but there is no option for that in CubeMX. Which interrupt I can use for this purpose? 0693W000000TszLQAS.png

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

Normally in a glabal timer interrupt, you look at the reason and act accordingly. With TIM1, you have already several interupts separated by their reason. What TIM 1 interrupt you should use depends on the task you have. E.g. to do something at rollover, use TIM 1 update. Read the reference manuals and timer cookbook for more information.

View solution in original post

2 REPLIES 2
Uwe Bonnes
Principal III

Normally in a glabal timer interrupt, you look at the reason and act accordingly. With TIM1, you have already several interupts separated by their reason. What TIM 1 interrupt you should use depends on the task you have. E.g. to do something at rollover, use TIM 1 update. Read the reference manuals and timer cookbook for more information.

GunkutA
Senior

Did not know there was a document as "Timer Cookbook", thank you for the info.