cancel
Showing results for 
Search instead for 
Did you mean: 

Caprure compare Interrupt

hdemi.1
Associate III

I try to generete interrupt when CNT register reach any value. But It generete when I enabled to interrupt EGR bit is always zero. when I try to change accept first bit not effected.

It is configuration

 capture = TIM_GetCapture2(ExternalOSCTimer);

 TIM_SetCompare2(ExternalOSCTimer, capture + .DelayOverFlow);

TIM_ITConfig(ExternalOSCTimer, TIM_IT_CC2, ENABLE);

0693W00000Y9bCXQAZ.png0693W00000Y9bCSQAZ.png

3 REPLIES 3
S.Ma
Principal

Find the Nucleo closest to the STM32 that you use.

Download STM32Cubexxx SW HAL library and examples and search for Timer examples with interrupt.

If you're going to answer like this, please don't.

gbm
Lead III

I can't see any problem. From what I can see, compare interrupt fires correctly - see the SR register. EGR has nothing to do with it.

If you are going to ask for help like this, please don't.