Timer ISR is not getting called after jump from bootloader

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by kounst on Wed Dec 02 01:15:44 MST 2015

in my application on the LPC1114 I'm using the 16bit timer 0. The match0 and match1 are set up to generate interrupts.
This is working fine.
I've now added a custom bootloder to my project. At power-on the bootloader is exected and after 5 seconds the bootloader jumps to my application.
With the bootloader the timer ISR of the Application FW is not getting called anymore. I can see that the match interrupt flags are set in the timer interrupt register and  I can see  in the debugger that all timer registers are setup as expected. But the interrupt is not getting called.

It seems that this has something to do with the way the jump from the bootloader to the application is achieved. If the jump from the bootloader to the application is performed within an ISR the behaviour is as described above. But if the jump to the application is done from the main loop (so, not from whtin an ISR) the application works just fine.

My thinking is that the NVIC is somehow getting confused because the ISR of the bootloader is never actually finished (becaus of the jump to the application). I tried to disable and clear the interrupts right before jumping but that didn't change anything.

Does anybody have an idea?
I have a workaround so I don't actually need to figure this out. It's very curious though...