Bird
0
0

Which of the following correctly delays a FreeRTOS task for 10 tick periods?

easy📝 Syntax Q3 of 15
FreeRTOS - Task Scheduling
Which of the following correctly delays a FreeRTOS task for 10 tick periods?
AvTaskDelay(10 / portTICK_PERIOD_MS);
BvTaskDelay(10);
CvTaskDelay(10 * portTICK_PERIOD_MS);
DvTaskDelayUntil(10);
Step-by-Step Solution
Solution:
  1. Step 1: Understand vTaskDelay parameter

    The parameter to vTaskDelay() is the number of tick periods to delay.
  2. Step 2: Analyze options

    vTaskDelay(10); directly delays for 10 ticks, which is correct. vTaskDelay(10 / portTICK_PERIOD_MS); divides by tick period, which is incorrect. vTaskDelay(10 * portTICK_PERIOD_MS); multiplies by tick period, which is also incorrect. vTaskDelayUntil(10); uses vTaskDelayUntil incorrectly.
  3. Final Answer:

    vTaskDelay(10); -> Option B
  4. Quick Check:

    vTaskDelay parameter is ticks, not milliseconds [OK]
Quick Trick: vTaskDelay parameter is tick count, not ms [OK]
Common Mistakes:
  • Confusing ticks with milliseconds
  • Using vTaskDelayUntil instead of vTaskDelay
  • Multiplying or dividing by portTICK_PERIOD_MS incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes