Skip to main content
GunkutA
Associate III
March 13, 2020
Solved

What is the difference between timer interrupts?

  • March 13, 2020
  • 2 replies
  • 8359 views

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

This topic has been closed for replies.
Best answer by Uwe Bonnes

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.

2 replies

Uwe Bonnes
Uwe BonnesBest answer
Chief
March 13, 2020

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
GunkutAAuthor
Associate III
March 13, 2020

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