Hi,
We have a project using the C5515 and CCS6.
We're using timer 0 interrupt to implement a simple CPU scheduler with a few tasks.
We have the following function that handles the interrupt:
interrupt void scheduler_isr()
Unfortunately, after some troubleshooting we found that not all registers were being saved by the interrupt handler from the compiler.
We had to insert the following code into the assembly file that was generated to force the registers to be saved:
PSHBOTH XAR4
PSHBOTH XAR5 ; added
PSHBOTH XAR6 ; added
PSHBOTH XAR7 ; added
PSHBOTH XDP ; added
PSH T2, T3 ; added
Afterwards everything worked great.
We also have the registers being popped off the stack on the return of the ISR.
Is there a way to force the compiler to include the above registers for saving/restoring context in an ISR?
Thanks