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

Caprure compare Interrupt

  • January 31, 2023
  • 2 replies
  • 1669 views

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

    This topic has been closed for replies.

    2 replies

    S.Ma
    Principal
    January 31, 2023

    Find the Nucleo closest to the STM32 that you use.

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

    hdemi.1
    hdemi.1Author
    Associate III
    February 2, 2023

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

    gbm
    Super User
    February 2, 2023

    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.

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