Bird
0
0

What is the most reliable method to ensure the watchdog only resets after confirming all tasks are responsive?

hard📝 Application Q8 of 15
FreeRTOS - Design Patterns for RTOS
In a FreeRTOS system, you have a watchdog task that must verify three separate tasks send periodic signals. What is the most reliable method to ensure the watchdog only resets after confirming all tasks are responsive?
AReset the watchdog timer immediately after receiving a signal from any one of the tasks.
BUse individual flags for each task and reset the watchdog timer only when all flags are set within the expected interval.
CReset the watchdog timer on a fixed timer interrupt without checking task signals.
DOnly monitor the task with the highest priority and ignore the others.
Step-by-Step Solution
Solution:
  1. Step 1: Track each task's heartbeat separately

    Maintain a flag or counter for each monitored task to record if it has sent a heartbeat signal within the expected time.
  2. Step 2: Check all flags before resetting watchdog

    Only reset the watchdog timer if all flags indicate that every task has reported in, ensuring no task is missed.
  3. Final Answer:

    Use individual flags for each task and reset the watchdog timer only when all flags are set within the expected interval. -> Option B
  4. Quick Check:

    All tasks must be confirmed alive before reset [OK]
Quick Trick: Confirm all task signals before resetting watchdog [OK]
Common Mistakes:
  • Resetting watchdog on any single task signal
  • Ignoring some tasks in monitoring
  • Using fixed timer resets without task checks

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes