Bird
0
0

Which FreeRTOS API pair is used to create a critical section by disabling and enabling interrupts?

easy📝 Conceptual Q2 of 15
FreeRTOS - Interrupt Management
Which FreeRTOS API pair is used to create a critical section by disabling and enabling interrupts?
AtaskENTER_CRITICAL() and taskEXIT_CRITICAL()
BvTaskSuspend() and vTaskResume()
CxSemaphoreTake() and xSemaphoreGive()
DvTaskDelay() and vTaskDelayUntil()
Step-by-Step Solution
Solution:
  1. Step 1: Identify critical section APIs

    FreeRTOS uses taskENTER_CRITICAL() to disable interrupts and taskEXIT_CRITICAL() to enable them back.
  2. Step 2: Differentiate from other APIs

    Other APIs manage tasks or semaphores, not interrupt disabling.
  3. Final Answer:

    taskENTER_CRITICAL() and taskEXIT_CRITICAL() -> Option A
  4. Quick Check:

    Critical section APIs = taskENTER_CRITICAL() and taskEXIT_CRITICAL() [OK]
Quick Trick: Use taskENTER_CRITICAL() and taskEXIT_CRITICAL() for critical sections [OK]
Common Mistakes:
  • Confusing semaphores with interrupt disabling
  • Using task suspend/resume for critical sections
  • Mixing delay functions with critical sections

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes