C166: Interrupt Pipeline Questions
Information in this article applies to:
We have a routine that intercepts all the page 0 interrupt vectors, looks up a new vector in a RAM table and executes the interrupt service routine (ISR). When it returns, it returns to our routine.
We had a problem in which R15 was sporadically corrupted after an ISR, yet everything was pushed and popped in the ISR as expected. When I add a couple of NOPs at the location in our routine that the Keil ISR would return to, then things seems to work (R15 is OK).
What's going on?
There are a couple of things to take care of when you write interrupt service routines. These issues are discussed in the Siemens C166 hardware user's guides. Make sure you check there for details.
The Keil C166 Compiler generates interrupt service routines which take care of those issues. However, if you write your own assembler routines, you must be aware of the pipeline effects described in the hardware manuals.
Last Reviewed: Thursday, February 25, 2021
of your data.