Clear Tim1 --- STM32L476RG?
Hello All....
Simple question. I am using the functions(HAL_TIM_Base_Stop_IT and HAL_TIM_Base_Start_IT). Basically I set a timer to count to a value and an interrupt occurs. The timer starts on a GPIO edge. I would like the timer to always zero out at the edge first. I have looked at the Start_IT function and cannot find where in this function the counter is first cleared before starting (maybe it is not). I then looked at the manual and cannot identify which bit or for that matter which register I should use to clear the counter of Tim1. Can someone tell me where this bit is? Does it exist in RCC or something?
I would like to add I am using the callback void HAL_TIM_PeriodElapsedCallback
Thanks