I am trying to create a delay using timers, but for some reason my timer is just staying stuck in interrupt routine.my while loop is also not working due that. My timer prescalar is 0 and counter value is 72, this is because I want interrupt to occur every 1Mhz meaning 1Us, but my timer remains stuck in interrupt loop. I am using stm32f103C8 with 72Mhz clock.
Can't get a damn thing of what you're saying, sorry. Mind adding the subtitles?
what software you are using to build this?
STM32CubeIDE 1.42 / STM32CubeMX 6.01-RC3
Thank you for this Video!
I am trying to create a delay using timers, but for some reason my timer is just staying stuck in interrupt routine.my while loop is also not working due that. My timer prescalar is 0 and counter value is 72, this is because I want interrupt to occur every 1Mhz meaning 1Us, but my timer remains stuck in interrupt loop. I am using stm32f103C8 with 72Mhz clock.
Is this based on my example?
@@stefanvandepas4249 no
But I am asking what is the reason for timer being stuck in interrupt routine
Be sure you are clearing the timer's interrupt pending flag inside the interrupt routine. I believe you clear it using __HAL_TIM_CLEAR_IT().