ARM Technical Support Knowledge Articles

What happens if an interrupt occurs as it is being enabled?

Applies to: ARM7TDMI

Answer

Interrupts are enabled by clearing the I (for IRQ) or F (for FIQ) flags in the CPSR with an MSR instruction. If an interrupt occurs as it is being enabled, the instruction following the MSR instruction will still be executed.

The reason is that the new flags are only available to the control logic at the end of the execution stage of the MSR instruction. The next instruction will have already been decoded and enters the execution stage of the instruction pipeline just as the flags are being changed.

Article last edited on: 2008-09-09 15:47:36

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential