Skip to content

In HardwareTimer library, generic update callback should clear update interrupt flag (UIF) automatically #1401

Closed Answered by ABOSTM
AndrewBCN asked this question in Q&A
Discussion options

You must be logged in to vote

One can see that the Update Interrupt Flag (UIF) for the timer in question is not cleared by the generic update callback function.

In fact, UIF flag is cleared:
HardwareTimer library is based on STM32 HAL driver, and this is the place where UIF flag is cleared.
Below is an example of call stack when Timer interrupt occurs:

  TIM1_IRQHandler()
   |-> HAL_TIM_IRQHandler()
        |->HAL_TIM_PeriodElapsedCallback()
              |->HardwareTimer::updateCallback(htim)

Flag is cleared in HAL_TIM_IRQHandler() before calling HAL_TIM_PeriodElapsedCallback()

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ABOSTM
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1400 on May 24, 2021 08:02.