I want to change the return address in the stack when running an ISR so that it returns to the specified address. But i found the compiler also pushes some variables to the stack. How can I configure the complier so that it only pushes all registers to the stack when it complies an ISR?
thank you for your kindly help!!
Thanks, Christoph.
I did write the timer ISR in a mix of C and assembly. Can you confirm that when the Keil complier complies an ISR, it only pushes all registers into the system stack at the beginning please?
"Can you confirm that when the Keil complier..."
If it's not explicitly documented, then you must not rely upon it!
Just don't take the risk - this really does need to be done in pure assembler!.