Bird
0
0

You want to use task notifications to signal multiple events to a task without using queues. Which approach best keeps notifications lightweight and efficient?

hard📝 Application Q15 of 15
FreeRTOS - Task Notifications
You want to use task notifications to signal multiple events to a task without using queues. Which approach best keeps notifications lightweight and efficient?
ASend multiple notifications with eSetValueWithOverwrite to store last event only
BUse global variables and disable interrupts to signal events
CCreate a queue to hold all event data and notify task on queue change
DUse a single notification value with bitwise flags and eSetBits action
Step-by-Step Solution
Solution:
  1. Step 1: Understand notification capabilities

    Task notifications can hold a 32-bit value, ideal for bitwise flags representing multiple events.
  2. Step 2: Choose efficient notification method

    Using eSetBits action sets bits without overwriting, allowing multiple event flags in one notification.
  3. Final Answer:

    Use a single notification value with bitwise flags and eSetBits action -> Option D
  4. Quick Check:

    Bitwise flags + eSetBits = efficient lightweight signaling [OK]
Quick Trick: Use bit flags with eSetBits for multiple events [OK]
Common Mistakes:
  • Overwriting notification value losing events
  • Using queues which add overhead
  • Using global variables risking race conditions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes