Keil Logo

C166: Interrupt Pipeline Questions


Information in this article applies to:

  • C166 All Versions

QUESTION

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?

ANSWER

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.

MORE INFORMATION


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.