Bird
0
0

Why does vTaskGetRunTimeStats() require a timer configured with a known frequency, and what happens if the timer frequency is incorrect?

hard📝 Conceptual Q10 of 15
FreeRTOS - Debugging and Monitoring
Why does vTaskGetRunTimeStats() require a timer configured with a known frequency, and what happens if the timer frequency is incorrect?
AThe timer triggers the function; incorrect frequency causes missed calls
BThe timer manages memory allocation; incorrect frequency causes leaks
CThe timer sets task priorities; incorrect frequency causes priority inversion
DThe timer measures CPU time; incorrect frequency causes wrong CPU usage percentages
Step-by-Step Solution
Solution:
  1. Step 1: Understand timer role in CPU usage measurement

    The timer counts CPU run time; frequency is used to calculate percentages accurately.
  2. Step 2: Effect of incorrect timer frequency

    If frequency is wrong, CPU usage percentages will be incorrect because calculations rely on timer ticks.
  3. Final Answer:

    The timer measures CPU time; incorrect frequency causes wrong CPU usage percentages -> Option D
  4. Quick Check:

    Timer frequency accuracy = correct CPU usage stats [OK]
Quick Trick: Timer frequency must be accurate for correct CPU usage stats [OK]
Common Mistakes:
  • Confusing timer role with triggering function calls
  • Thinking timer affects priorities
  • Assuming timer manages memory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes