Skip to main content
Graduate II
May 6, 2024
Solved

Enabling timer compare interrupt only on rising edges or falling edges

  • May 6, 2024
  • 1 reply
  • 1261 views

Hello,
I have programmed one of the advanced timers in up/down mode and I have used one of the compare units to generate a PWM signal.

I would also like to generate an interrupt on compare events, but only on the falling edges.
Is it possible to specify the edge directon when enabling the compare event interrupt?
Or I have to distingush the edge direction only after the interrupt has been triggered on compare event, by checking the counter direction?

Thank you,
Carlo

 

    This topic has been closed for replies.
    Best answer by waclawek.jan

    > Is it possible to specify the edge directon when enabling the compare event interrupt?

     

    waclawekjan_0-1715016721699.png

    JW

    1 reply

    Super User
    May 6, 2024

    > Is it possible to specify the edge directon when enabling the compare event interrupt?

     

    waclawekjan_0-1715016721699.png

    JW

    CTabo.1Author
    Graduate II
    May 7, 2024

    Thank you very much!

    Regards,
    Carlo