Bird
0
0

Which of the following is the correct syntax to enable an interrupt in NVIC for IRQ number 5 in C?

easy📝 Factual Q3 of 15
ARM Architecture - Exception and Interrupt Model
Which of the following is the correct syntax to enable an interrupt in NVIC for IRQ number 5 in C?
ANVIC_EnableIRQ(IRQ5);
BNVIC_EnableIRQ(5);
CNVIC_EnableIRQ(IRQn_5);
DNVIC_EnableIRQ(IRQ_5);
Step-by-Step Solution
Solution:
  1. Step 1: Understand NVIC enable function syntax

    The function NVIC_EnableIRQ() takes the IRQ number as an argument, usually an integer or defined IRQn value.
  2. Step 2: Identify correct argument format

    Passing the integer 5 directly is correct; other options use incorrect or undefined identifiers.
  3. Final Answer:

    NVIC_EnableIRQ(5); -> Option B
  4. Quick Check:

    Correct NVIC enable syntax = NVIC_EnableIRQ(5); [OK]
Quick Trick: Use integer IRQ number directly in NVIC_EnableIRQ() [OK]
Common Mistakes:
  • Using undefined IRQ names
  • Adding extra underscores in IRQ names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes