exchange INTC handler

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use intc_register_interrupt from SF to register interrupt handler for PWM. it works fine.
then I have to exchange channels at run-time, ie. PWM0 and PWM1 swaps somehow. my first thought is to have two differnt interrupt handler routine, and swap them at run-time with int_register_interrupt. but it comes to problems.
I don't ask you to solve my problems, just want to know, is there anybody who did swap handlers in that way ? is it possible ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes it is possible to swap the handler runtime, just remember to do it with interrupts disabled, or you could run into interesting behavior ;)

Also, both functions must have the interrupt attribute.

Hans-Christian