0
0
FreeRTOSprogramming~20 mins

FreeRTOS interrupt priority restrictions - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
FreeRTOS Interrupt Priority Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
Interrupt Priority and API Call Safety

Consider a FreeRTOS system where configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 0x20. An interrupt with priority 0x10 calls a FreeRTOS API function that is not safe to call from that priority level. What will most likely happen?

AThe FreeRTOS kernel may behave unpredictably or crash due to priority violation.
BThe system will run normally without any issues.
CThe interrupt will be automatically lowered to a safe priority by FreeRTOS.
DThe API call will be ignored silently by FreeRTOS.
Attempts:
2 left
💡 Hint

Think about what happens if an interrupt calls a FreeRTOS API function from a priority above the allowed maximum.

🧠 Conceptual
intermediate
1:30remaining
Understanding configMAX_SYSCALL_INTERRUPT_PRIORITY

What does the FreeRTOS configuration constant configMAX_SYSCALL_INTERRUPT_PRIORITY control?

AIt disables all interrupts above a certain priority level.
BIt defines the lowest interrupt priority allowed in the system.
CIt sets the highest interrupt priority from which FreeRTOS API calls can be safely made.
DIt sets the priority of the FreeRTOS kernel task.
Attempts:
2 left
💡 Hint

Think about which interrupts can safely call FreeRTOS API functions.

🔧 Debug
advanced
2:30remaining
Debugging Priority Violation in ISR

A developer reports that their FreeRTOS application crashes when an ISR calls xQueueSendFromISR(). The ISR priority is set to 0x10, and configMAX_SYSCALL_INTERRUPT_PRIORITY is 0x20. What is the most likely cause?

AThe ISR is missing a call to <code>portYIELD_FROM_ISR()</code> after sending to the queue.
BThe queue handle passed to <code>xQueueSendFromISR()</code> is NULL.
CThe FreeRTOS scheduler was not started before the ISR executed.
DThe ISR priority is too high (numerically lower) and violates the maximum syscall interrupt priority restriction.
Attempts:
2 left
💡 Hint

Check the relationship between ISR priority and configMAX_SYSCALL_INTERRUPT_PRIORITY.

📝 Syntax
advanced
2:00remaining
Correct Priority Setting for ISR

Which of the following correctly sets an ISR priority to be safe for calling FreeRTOS API functions if configMAX_SYSCALL_INTERRUPT_PRIORITY is 0x30?

ANVIC_SetPriority(IRQn, 0x40);
BNVIC_SetPriority(IRQn, 0x00);
CNVIC_SetPriority(IRQn, 0x10);
DNVIC_SetPriority(IRQn, 0x20);
Attempts:
2 left
💡 Hint

Remember that lower numerical values mean higher priority.

🚀 Application
expert
3:00remaining
Designing ISR Priorities with FreeRTOS Restrictions

You are designing a system with three interrupts: Timer (priority 0x10), UART (priority 0x40), and ADC (priority 0x50). configMAX_SYSCALL_INTERRUPT_PRIORITY is set to 0x40. Which interrupts can safely call FreeRTOS API functions?

AOnly Timer interrupt can safely call FreeRTOS API functions.
BOnly UART and ADC interrupts can safely call FreeRTOS API functions.
CAll three interrupts can safely call FreeRTOS API functions.
DNone of the interrupts can safely call FreeRTOS API functions.
Attempts:
2 left
💡 Hint

Compare each interrupt priority to configMAX_SYSCALL_INTERRUPT_PRIORITY.