Skip to main content
hdemi.1
Associate III
January 10, 2023
Question

Specific ARR value interrupt

  • January 10, 2023
  • 1 reply
  • 498 views

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 ?

This topic has been closed for replies.

1 reply

gbm
Lead III
January 10, 2023

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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice