Bird
0
0

You wrote this code to notify a task:

medium📝 Debug Q14 of 15
FreeRTOS - Task Notifications
You wrote this code to notify a task:
void notifyTask() {
    xTaskNotify(taskHandle, 0x01, eSetValueWithOverwrite);
}
But the task never receives the notification. What is the likely problem?
ANotifications require queues to work
BeSetValueWithOverwrite is not a valid action
CThe taskHandle is NULL or invalid
DYou must call xTaskNotifyGive instead
Step-by-Step Solution
Solution:
  1. Step 1: Check task handle validity

    If taskHandle is NULL or invalid, notification cannot be delivered.
  2. Step 2: Verify notification action and function

    eSetValueWithOverwrite is valid, and xTaskNotify is correct for sending notifications.
  3. Final Answer:

    The taskHandle is NULL or invalid -> Option C
  4. Quick Check:

    Invalid task handle blocks notification = A [OK]
Quick Trick: Check taskHandle is valid before notifying [OK]
Common Mistakes:
  • Using wrong notification action
  • Assuming queues are needed for notifications
  • Confusing xTaskNotifyGive with xTaskNotify

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes