Bird
0
0

You have an ISR running at priority 0x10 and configMAX_SYSCALL_INTERRUPT_PRIORITY set to 0x30. You want this ISR to safely notify a task. Which approach is correct?

hard📝 Application Q8 of 15
FreeRTOS - Interrupt Management

You have an ISR running at priority 0x10 and configMAX_SYSCALL_INTERRUPT_PRIORITY set to 0x30. You want this ISR to safely notify a task. Which approach is correct?

ARaise the ISR priority to 0x40 and use <code>xTaskNotifyFromISR()</code>
BLower the ISR priority to 0x30 or below and use <code>xTaskNotifyFromISR()</code>
CKeep ISR priority at 0x10 and call <code>vTaskNotifyGive()</code> directly
DUse <code>vTaskDelay()</code> inside ISR to wait for the task
Step-by-Step Solution
Solution:
  1. Step 1: Check ISR priority against configMAX_SYSCALL_INTERRUPT_PRIORITY

    ISR priority 0x10 is higher than 0x30, so it must be lowered to 0x30 or below to safely call FreeRTOS APIs.
  2. Step 2: Choose correct API for ISR notification

    xTaskNotifyFromISR is designed for ISR context and safe to use if priority rules are met.
  3. Final Answer:

    Lower the ISR priority to 0x30 or below and use xTaskNotifyFromISR() -> Option B
  4. Quick Check:

    ISR priority ≤ max syscall priority + FromISR API = Safe call [OK]
Quick Trick: Lower ISR priority and use FromISR APIs for notifications [OK]
Common Mistakes:
  • Raising ISR priority above max syscall priority
  • Calling task APIs not designed for ISR
  • Using blocking calls inside ISR

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes