What is config KERNEL INTERRUPT PRIORITY?

Hi Gaurav/Richard,

I think I understand now. Let me summarize, and correct me if I am wrong:

  1. While Kernel is running, it should not be interrupted by interrupt which calls FreeRTOS API function. It can be, however, be interrupted by interrupt which does not call API functions. This is because Kernel has critical sections, and interrupting Kernel’s critical sections with an interrupt which calls FreeRTOS API will potentially cause data corruption

  2. In a port which implements both configKERNEL _INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY: when Kernel is running, IPL (in case of RX port) is set (by the Kernel code) to configMAX_SYSCALL_INTERRUPT_PRIORITY, such that only interrupts having priority high than this, are able to interrupt the Kernel

  3. Therefore, when assigning priority level to a interrupt, user should check whether it calls API function or not. If it does not, then it can be assigned priority higher than configMAX_SYSCALL_INTERRUPT_PRIORITY. If the interrupt does call API function, than its assigned priority cannot be higher than configMAX_SYSCALL_INTERRUPT_PRIORITY; because if otherwise, this interrupt (which calls API function) is able to interrupt the Kernel (which violates 1. above)

1 Like