I am using FreeRTOS v7.02 with an Energy Micro microcontroller (Cortex M-3 port). I have already made a version of my application and it works, so I have a baseline. Now I am overhauling the code. The application is very much interrupt driven and I am using the “built-in” EFM32 interrupts and their priorities as defined in the startup file:
DCD GPIO_EVEN_IRQHandler ; 1: GPIO_EVEN Interrupt
DCD TIMER0_IRQHandler ; 2: TIMER0 Interrupt
DCD USART0_RX_IRQHandler ; 3: USART0_RX Interrupt
Originally I created identical code for the GPIO_EVEN_IRQHandler and GPIO_ODD_IRQHandler functions. However I now want these functions to call a single function to perform basic interrupt handling duties before it gives a semaphore to unblock a task.
My question is this:
1. In reading through all the information on interrupts and FreeRTOS, I saw that configMAX_SYSCALL_INTERRUPT_PRIORITY defines “the highest interrupt priority from which FreeRTOS API functions can be called”. My config file defines configMAX_SYSCALL_INTERRUPT_PRIORITY as 191 (equivalent to priority 5). However the GPIO_EVEN Interrupt has a priority of 1 and I was able to use _FROMISR functions in this interrupt handler with no problem (that I could tell). Was this a time bomb of a problem waiting to happen? (The GPIO interrupts are always interrupting the Idle Task so the risk of corrupting data is minimal. I also understand that ARM uC do their priorities so that the lower the interrupt priority number, the higher the priority.)