Bird
0
0

In a FreeRTOS system, you want to ensure a task runs exactly every 10 ms without delay accumulation. Which method is best?

hard📝 Application Q9 of 15
FreeRTOS - RTOS Fundamentals
In a FreeRTOS system, you want to ensure a task runs exactly every 10 ms without delay accumulation. Which method is best?
AUse vTaskDelayUntil with a fixed last wake time
BUse vTaskDelay with 10 ms each time
CUse a busy-wait loop for 10 ms
DUse vTaskSuspend and vTaskResume every 10 ms
Step-by-Step Solution
Solution:
  1. Step 1: Understand delay functions

    vTaskDelay causes delay relative to current time, which can accumulate errors.
  2. Step 2: Use vTaskDelayUntil for fixed periodic timing

    vTaskDelayUntil uses last wake time to maintain exact periodicity without drift.
  3. Final Answer:

    Use vTaskDelayUntil with a fixed last wake time -> Option A
  4. Quick Check:

    vTaskDelayUntil for precise periodic tasks [OK]
Quick Trick: vTaskDelayUntil avoids timing drift [OK]
Common Mistakes:
  • Using vTaskDelay causing drift
  • Busy-wait wastes CPU
  • Suspending/resuming is inefficient

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes