Skip to main content
JSven.9
Associate II
August 19, 2021
Question

How can you know that an update event on TIM5 (for example) is actually an overflow?

  • August 19, 2021
  • 3 replies
  • 672 views

I set up tim5 in compare mode to get an interrupt at a specific tick, but I am also interested in the overflows. I get an update interrupt very early after starting the timer, so it is definitely not an overflow. Is there some register I should read after an update-event interrupt where I can disambiguate the type of update?

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
August 19, 2021

> interrupt very early after starting the timer

Using Cube? This is consequence of Cube forcing update by setting TIMx_EGR.UG, to enforce reload of PSC.

JW

JSven.9
JSven.9Author
Associate II
August 19, 2021

Thanks JW, That may be the reason. But what I want to know is if I can tell the difference between one kind of update event and the overflow?

waclawek.jan
Super User
August 19, 2021

No, there's no such differentiating feature.

JW