Bird
0
0

How can you safely call FreeRTOS API functions from nested ISRs with different priorities?

hard📝 Application Q9 of 15
FreeRTOS - Interrupt Management

How can you safely call FreeRTOS API functions from nested ISRs with different priorities?

ADisable nesting before calling any FreeRTOS API in ISR
BUse taskENTER_CRITICAL() inside ISRs before API calls
COnly call FreeRTOS APIs from the highest priority ISR
DEnsure all ISRs calling FreeRTOS APIs have priority equal or higher than configMAX_SYSCALL_INTERRUPT_PRIORITY
Step-by-Step Solution
Solution:
  1. Step 1: Understand FreeRTOS interrupt priority rules

    FreeRTOS API functions can only be called from ISRs with priority at or below configMAX_SYSCALL_INTERRUPT_PRIORITY.
  2. Step 2: Apply to nested ISRs

    All ISRs calling FreeRTOS APIs must have priority equal or numerically higher (lower priority) than this limit to be safe.
  3. Final Answer:

    Ensure all ISRs calling FreeRTOS APIs have priority equal or higher than configMAX_SYSCALL_INTERRUPT_PRIORITY -> Option D
  4. Quick Check:

    FreeRTOS API safe ISR priority = ≤ configMAX_SYSCALL_INTERRUPT_PRIORITY [OK]
Quick Trick: Call FreeRTOS APIs only from allowed ISR priorities [OK]
Common Mistakes:
  • Disabling nesting unnecessarily
  • Calling APIs from any ISR priority
  • Using taskENTER_CRITICAL() inside ISR

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes