Skip to main content
GunkutA
Associate III
Mar 13, 2020 1:30 PM UTC
Solved

What is the difference between timer interrupts?

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.
Uwe Bonnes
Uwe BonnesBest answer
Chief
Mar 13, 2020 1:52 PM UTC

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
Mar 13, 2020 1:52 PM UTC

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
Mar 13, 2020 1:56 PM UTC

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