Bird
0
0

How would you configure NVIC to prioritize an interrupt with pre-emption priority 2 and subpriority 1 using CMSIS functions?

hard📝 Application Q9 of 15
ARM Architecture - Exception and Interrupt Model
How would you configure NVIC to prioritize an interrupt with pre-emption priority 2 and subpriority 1 using CMSIS functions?
AUse NVIC_DisableIRQ before setting priority
BSet priority grouping, then call NVIC_SetPriority with combined priority value
CCall NVIC_EnableIRQ with pre-emption and subpriority as arguments
DSet priority only using NVIC_SetPriorityGrouping
Step-by-Step Solution
Solution:
  1. Step 1: Set priority grouping

    First, configure priority grouping to split bits between pre-emption and subpriority.
  2. Step 2: Use NVIC_SetPriority with combined priority

    Calculate combined priority value and set it using NVIC_SetPriority for the IRQ.
  3. Final Answer:

    Set priority grouping, then call NVIC_SetPriority with combined priority value -> Option B
  4. Quick Check:

    Priority grouping + NVIC_SetPriority = correct config [OK]
Quick Trick: Set grouping first, then set combined priority value [OK]
Common Mistakes:
  • Trying to enable IRQ with priority params
  • Ignoring priority grouping before setting priority

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes