FreeRTOS - Interrupt ManagementWhich of the following is the correct prototype for a FreeRTOS ISR handler that defers processing using task notifications?Avoid ISR_Handler(void)Bvoid ISR_Handler(void) { BaseType_t xHigherPriorityTaskWoken = pdFALSE; xTaskNotifyFromISR(..., &xHigherPriorityTaskWoken); portYIELD_FROM_ISR(xHigherPriorityTaskWoken); }Cvoid ISR_Handler(void) __attribute__((interrupt))Dvoid ISR_Handler(void) { vTaskDelay(10); }Check Answer
Step-by-Step SolutionSolution:Step 1: Recognize correct ISR with deferred processingvoid ISR_Handler(void) { BaseType_t xHigherPriorityTaskWoken = pdFALSE; xTaskNotifyFromISR(..., &xHigherPriorityTaskWoken); portYIELD_FROM_ISR(xHigherPriorityTaskWoken); } shows proper use of xTaskNotifyFromISR and portYIELD_FROM_ISR to defer work.Step 2: Why other options are incorrectA and C lack deferred processing code; D uses vTaskDelay inside ISR which is invalid.Final Answer:ISR with xTaskNotifyFromISR and portYIELD_FROM_ISR -> Option BQuick Check:Correct ISR prototype includes notification and yield macros [OK]Quick Trick: Use portYIELD_FROM_ISR after notifying task in ISR [OK]Common Mistakes:Calling vTaskDelay inside ISRNot using portYIELD_FROM_ISR after notificationMissing BaseType_t variable for task notification
Master "Interrupt Management" in FreeRTOS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More FreeRTOS Quizzes Debugging and Monitoring - Common RTOS bugs and debugging strategies - Quiz 3easy Design Patterns for RTOS - Health monitoring and heartbeat - Quiz 14medium Design Patterns for RTOS - Producer-consumer pattern - Quiz 5medium Interrupt Management - ISR-safe API functions (FromISR suffix) - Quiz 14medium Interrupt Management - Critical sections and interrupt disabling - Quiz 10hard Interrupt Management - configMAX_SYSCALL_INTERRUPT_PRIORITY - Quiz 13medium Memory Management - Stack overflow detection (method 1 and 2) - Quiz 9hard Memory Management - pvPortMalloc and vPortFree - Quiz 11easy Memory Management - Memory usage monitoring - Quiz 13medium Task Notifications - Task notification vs queue performance - Quiz 7medium