Solved
How to disable HAL_TIM_PeriodElapsedCallback on a timer
Hi I would like to know if I can still get the interrupt updates of a timer but disable the call to the callback HAL_TIM_PeriodElapsedCallback.
Hi I would like to know if I can still get the interrupt updates of a timer but disable the call to the callback HAL_TIM_PeriodElapsedCallback.
You can disable the update interrupt with resetting appropriate bit in DIER register of the timer. For TIM1 it would be something like:
htim1.Instance->DIER&=~(TIM_DIER_UIE);There is no possibility to tell HAL not use call a callback function, but as I said earlier you can define your own callback function. Can you maybe further describe your use case? Maybe I am not understanding correctly.
Kind regards,
Petr
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.