NVIC_SetVector while SoftDevice active

Using nrf5 SDK (not connect):

I have a RTC2_IRQHandler that is correctly being called.

rather than:

void RTC2_IRQHandler() {

 if (mode == 2) {

    handleMode2();

 } else {

    handleMode1();

 }

}

I'd like to be able to have two separate interrupt handlers, and switch between them. NVIC_SetVector doesn't seem to work? Even after calling it, the old IRQ handler is invoked.

Is this expected? Any workaround/alternative?

Thanks!

Jeff

Parents Reply
  • Hi Jthlim, 

    I don't think it's possible to change the vector table after the softdevice is active. There is no NVIC_SetVector equivalent when softdevice is active, see nrf_nvic.h in the softdevice\header folder. 

    By default the vector table is populated with the weak xxxIRQHandler symbols (in your case RTC2_IRQHandler) that you can overwrite but I don't see a way of switching it to another one. 

    What's the issue with the logic using "mode" in your implementation ? 

Children
Related