Tool/software: Code Composer Studio
I have a small question about the INTERRUPT(func,IRQ/FIQ) pragma in code composer studio.
I'm using the RM57Lx LaunchPad and am successfully creating interrupts, but noticed an issue when the interrupt was called during a subroutine; once the interrupt was serviced and it returned to the called function, it never left that function (main loop->function->interrupt->function->function->....). I found out later that this is because the ARM Cortex-R4/R5 processors only have one SPSR and LR registers, so the LR was never properly restored after the interrupt. The solution the I found (found it in spnA219: http://www.ti.com/lit/an/spna219/spna219.pdf), but I never got it to work (it never entered the irqDispactch_a.asm file so the stack was never saved with the push/pop stuff). Still want to figure out why it's not working with my project but works with the example project but I can deal with that later.
Anyways, when I put in the INTERRUPT pragma directive before the ISR function, then the push/pop stuff seems to be implemented and I don't get stuck in the called function. So my question is what exactly does the INTERRUPT pragma do? Still pretty new to MCUs and especially paying attention to the lower level stuff like push/pop functionality.
Also, if anyone knows how to implement the the push/pop in a custom assembly/C file(s) and get it to work, any info would be appreciated. I've attached a .zip containing the example project that uses that method (not the #pragma INTERRUPT).
Thanks