Bird
0
0

You want to notify a task from multiple ISRs using ISR-to-task notifications. Which approach ensures the task processes all notifications without missing any?

hard📝 Application Q15 of 15
FreeRTOS - Task Notifications
You want to notify a task from multiple ISRs using ISR-to-task notifications. Which approach ensures the task processes all notifications without missing any?
AUse vTaskNotifyGiveFromISR() once and ulTaskNotifyTake() once; task processes only one notification
BUse xTaskNotifyGive() in ISRs and ulTaskNotifyTake() in task with zero timeout
CUse ulTaskNotifyTake() with clear count and call vTaskNotifyGiveFromISR() in each ISR; task loops to process all notifications
DUse a global variable incremented in ISRs and checked in task without notifications
Step-by-Step Solution
Solution:
  1. Step 1: Understand multiple ISR notifications

    Each ISR calls vTaskNotifyGiveFromISR() to increment notification count.
  2. Step 2: Task processes all notifications

    Task uses ulTaskNotifyTake(pdTRUE, portMAX_DELAY) in a loop to clear all counts and process each notification.
  3. Final Answer:

    Use ulTaskNotifyTake() with clear count and call vTaskNotifyGiveFromISR() in each ISR; task loops to process all notifications -> Option C
  4. Quick Check:

    Multiple ISR notifications require counting and looping [OK]
Quick Trick: Loop ulTaskNotifyTake() to handle multiple ISR signals [OK]
Common Mistakes:
  • Assuming one notification covers all ISR events
  • Using non-FromISR functions in ISR
  • Ignoring notification count clearing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes