Bird
0
0

Which of the following is the correct way to notify a task from an ISR in FreeRTOS?

easy📝 Syntax Q12 of 15
FreeRTOS - Interrupt Management
Which of the following is the correct way to notify a task from an ISR in FreeRTOS?
AxTaskNotifyGiveFromISR(taskHandle, &higherPriorityTaskWoken);
BxTaskNotifyGive(taskHandle);
CvTaskDelay(10);
DxQueueSend(queueHandle, &data, portMAX_DELAY);
Step-by-Step Solution
Solution:
  1. Step 1: Identify ISR-safe notification function

    Only functions ending with 'FromISR' are safe to call inside ISRs.
  2. Step 2: Check options

    xTaskNotifyGiveFromISR is designed for ISR context; others are not ISR-safe or unrelated.
  3. Final Answer:

    xTaskNotifyGiveFromISR(taskHandle, &higherPriorityTaskWoken); -> Option A
  4. Quick Check:

    ISR notification uses FromISR functions [OK]
Quick Trick: Use 'FromISR' functions inside ISRs only [OK]
Common Mistakes:
  • Using normal task notification functions inside ISR
  • Calling blocking functions like vTaskDelay in ISR
  • Using queue send with infinite block time inside ISR

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes