0
0
FreeRTOSprogramming~10 mins

Nested interrupt handling in FreeRTOS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable nested interrupts by setting the correct priority grouping.

FreeRTOS
NVIC_SetPriorityGrouping([1]);
Drag options to blanks, or click blank then click option'
ANVIC_PRIORITYGROUP_3
BNVIC_PRIORITYGROUP_2
CNVIC_PRIORITYGROUP_4
DNVIC_PRIORITYGROUP_1
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a priority grouping that disables subpriority levels.
Using NVIC_PRIORITYGROUP_4 which disables nested interrupts.
2fill in blank
medium

Complete the code to set the priority of an interrupt to allow nesting.

FreeRTOS
NVIC_SetPriority(USART1_IRQn, [1]);
Drag options to blanks, or click blank then click option'
A5
B15
C0
D255
Attempts:
3 left
💡 Hint
Common Mistakes
Setting priority to 0 which disables nesting by making it highest priority.
Using 255 which is invalid for priority levels.
3fill in blank
hard

Fix the error in the interrupt handler declaration to support nesting.

FreeRTOS
void [1](void) {
    // Interrupt code
}
Drag options to blanks, or click blank then click option'
AUSART1_Interrupt
BUSART1_IRQHandler
CUSART1_Handler
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect handler names that do not match the vector table.
Misspelling or wrong casing in the handler function name.
4fill in blank
hard

Fill both blanks to correctly enable and set priority for a nested interrupt.

FreeRTOS
NVIC_EnableIRQ([1]);
NVIC_SetPriority([2], 3);
Drag options to blanks, or click blank then click option'
ATIM2_IRQn
BUSART2_IRQn
CTIM3_IRQn
DUSART1_IRQn
Attempts:
3 left
💡 Hint
Common Mistakes
Using different interrupt names in enable and set priority calls.
Choosing interrupts not configured for nesting.
5fill in blank
hard

Fill all three blanks to create a nested interrupt safe critical section using FreeRTOS API.

FreeRTOS
taskENTER_CRITICAL();
[1]();
// Critical code
[2]();
NVIC_SetPriority([3], 1);
Drag options to blanks, or click blank then click option'
AportDISABLE_INTERRUPTS
BportENABLE_INTERRUPTS
CTIM4_IRQn
DportSET_INTERRUPT_MASK
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to disable or enable interrupts properly.
Setting priority on wrong interrupt number.