This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

reset while modifying interrupt vector

In my code i am changing interrupt vector for timer to have my functions as ISR. Will microcontroller reset when i change interrupt vector?

  • No, it will not reset just because you change the interrupt vector. The interrupt vector is very similar to a normal function pointer.

    But the interrupt vector must be changed with a single processor instruction (so you can't get an interrupt in the middle of the update), or you must deactivate the interrupt source - or block all interrupts - while changing it.

    If you change the interrupt vector at the start of the program - before having activated the relevant interrupt source - then you don't need any extra precautions. Just make it point to the correct interrupt handler.