2023-01-10 01:54 AM
Hi,
I am usinfg STM32F0 and TIM1(16 bit) , ARR value has to be 0xFFFF and I want to generete interrupt for specific ARR value etc(when ARR is 32500). My project is very complicated. What is the best way to do this ?
2023-01-10 05:06 AM
ARR does not change by itself. I guess what you want to achieve is to generate an interupt when CNT register reaches the specified value. That's pretty simple - just use timer compare function (active by default after reset, no need to program it), set one of CCRx register to the specified value and enable the selected CCx interrupt in DIER register.