Bird
0
0

What is wrong with this ISR code snippet if configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 0x30?

medium📝 Debug Q6 of 15
FreeRTOS - Interrupt Management

What is wrong with this ISR code snippet if configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 0x30?

void ISR_Handler(void) {
  vTaskDelay(10);
}
ANo issue; this is valid ISR code
BISR priority is too low to call <code>vTaskDelay</code>
CThe ISR should disable interrupts before calling <code>vTaskDelay</code>
DCalling <code>vTaskDelay</code> inside ISR is invalid regardless of priority
Step-by-Step Solution
Solution:
  1. Step 1: Understand vTaskDelay usage

    vTaskDelay is a blocking API function that must not be called from an ISR.
  2. Step 2: Check ISR context restrictions

    Only special 'FromISR' API functions are safe to call inside ISRs, regardless of priority.
  3. Final Answer:

    Calling vTaskDelay inside ISR is invalid regardless of priority -> Option D
  4. Quick Check:

    Blocking API calls inside ISR = Invalid [OK]
Quick Trick: Use FromISR APIs inside interrupts only [OK]
Common Mistakes:
  • Calling blocking APIs inside ISR
  • Assuming priority allows any API call
  • Not distinguishing FromISR functions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes