Bird
0
0

What is the correct definition?

hard📝 Application Q8 of 15
FreeRTOS - Interrupt Management

You need to configure configMAX_SYSCALL_INTERRUPT_PRIORITY for a Cortex-M7 with 5 priority bits, ensuring interrupts with priority 10 and below can call FreeRTOS API safely. What is the correct definition?

A#define configMAX_SYSCALL_INTERRUPT_PRIORITY (5 << (8 - 5))
B#define configMAX_SYSCALL_INTERRUPT_PRIORITY (10 >> (8 - 5))
C#define configMAX_SYSCALL_INTERRUPT_PRIORITY 10
D#define configMAX_SYSCALL_INTERRUPT_PRIORITY (10 << (8 - 5))
Step-by-Step Solution
Solution:
  1. Step 1: Understand priority bits and shifting

    Cortex-M7 uses 5 priority bits; priority values must be shifted left by (8 - 5) = 3 bits.
  2. Step 2: Apply shift to priority 10

    Shift 10 left by 3 bits: 10 << 3 = 80 decimal (0x50 hex).
  3. Final Answer:

    #define configMAX_SYSCALL_INTERRUPT_PRIORITY (10 << (8 - 5)) -> Option D
  4. Quick Check:

    Shift priority by (8 - bits) to get correct value [OK]
Quick Trick: Shift priority left by (8 - priority bits) for correct config [OK]
Common Mistakes:
  • Using right shift instead of left
  • Not shifting priority value
  • Using wrong priority number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes