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?
Think about what happens if an interrupt calls a FreeRTOS API function from a priority above the allowed maximum.
FreeRTOS requires that interrupts calling certain API functions must have a priority equal to or numerically higher (lower urgency) than configMAX_SYSCALL_INTERRUPT_PRIORITY. Violating this causes unpredictable behavior or crashes.
What does the FreeRTOS configuration constant configMAX_SYSCALL_INTERRUPT_PRIORITY control?
Think about which interrupts can safely call FreeRTOS API functions.
configMAX_SYSCALL_INTERRUPT_PRIORITY defines the highest interrupt priority (numerically lowest) from which FreeRTOS API functions that end in "FromISR" can be called safely.
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?
Check the relationship between ISR priority and configMAX_SYSCALL_INTERRUPT_PRIORITY.
Calling FreeRTOS API functions from an ISR with priority higher than configMAX_SYSCALL_INTERRUPT_PRIORITY causes crashes or undefined behavior.
Which of the following correctly sets an ISR priority to be safe for calling FreeRTOS API functions if configMAX_SYSCALL_INTERRUPT_PRIORITY is 0x30?
Remember that lower numerical values mean higher priority.
Interrupt priorities numerically equal or higher (less urgent) than configMAX_SYSCALL_INTERRUPT_PRIORITY are safe to call FreeRTOS API functions. 0x40 is numerically higher than 0x30, so it is safe.
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?
Compare each interrupt priority to configMAX_SYSCALL_INTERRUPT_PRIORITY.
Only interrupts with priority numerically equal or higher (less urgent) than configMAX_SYSCALL_INTERRUPT_PRIORITY (0x40) can safely call FreeRTOS API functions. Timer (0x10) is higher priority and cannot.