Bird
0
0

You want to protect a critical section of code from interrupts in ARM. Which sequence correctly disables interrupts before the section and enables them after?

hard📝 Application Q15 of 15
ARM Architecture - Exception and Interrupt Model
You want to protect a critical section of code from interrupts in ARM. Which sequence correctly disables interrupts before the section and enables them after?
ACPSID i before, CPSIE i after
BCPSIE i before, CPSID i after
CNOP before, CPSID i after
DMOV R0, #0 before, MOV R0, #1 after
Step-by-Step Solution
Solution:
  1. Step 1: Disable interrupts before critical section

    Use CPSID i to disable interrupts and protect the code.
  2. Step 2: Enable interrupts after critical section

    Use CPSIE i to re-enable interrupts after the critical code finishes.
  3. Final Answer:

    CPSID i before, CPSIE i after -> Option A
  4. Quick Check:

    Disable then enable interrupts around critical code [OK]
Quick Trick: Disable interrupts before, enable after critical code [OK]
Common Mistakes:
  • Reversing enable and disable order
  • Using unrelated instructions like NOP or MOV
  • Not re-enabling interrupts after critical section

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes