Bird
0
0

You observe that a FreeRTOS task sometimes stops running unexpectedly. Which debugging strategy is best to identify if a stack overflow caused this?

medium📝 Debug Q14 of 15
FreeRTOS - Debugging and Monitoring
You observe that a FreeRTOS task sometimes stops running unexpectedly. Which debugging strategy is best to identify if a stack overflow caused this?
AEnable configCHECK_FOR_STACK_OVERFLOW and use configASSERT
BIncrease task priority to highest level
CDisable all interrupts temporarily
DUse vTaskDelay to slow down the task
Step-by-Step Solution
Solution:
  1. Step 1: Identify debugging features for stack overflow

    FreeRTOS provides configCHECK_FOR_STACK_OVERFLOW and configASSERT to detect stack overflow at runtime.
  2. Step 2: Choose the best debugging method

    Enabling these features helps catch stack overflow errors causing task failure.
  3. Final Answer:

    Enable configCHECK_FOR_STACK_OVERFLOW and use configASSERT -> Option A
  4. Quick Check:

    Stack overflow debug = configCHECK_FOR_STACK_OVERFLOW [OK]
Quick Trick: Use FreeRTOS built-in stack overflow checks [OK]
Common Mistakes:
  • Thinking priority change fixes stack overflow
  • Disabling interrupts hides bugs
  • Using delay does not detect stack issues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes