First of all, let me congratulate the involved people on the great job done with freeRTOS.
I am using a CodeVisionAVR port of freeRTOS on an ATXMega256A3. Everything seems to be working fine. I set up a “demo” project with several of the testing tasks existent with the freeRTOS distribution (integer and floating point maths, block queues, polled queues, semaphores, coroutines) - ran for 24h+ with no problems, so I would check it as usable. The only ISR I have now is the Timer0 ISR - the tick ISR.
I have a couple of questions related to further design of the application.
1) Interrupts: The XMega has 3 interrupt priorities (low, medium, high). I am planning to use the tick interrupt from Timer0 at low level, and USART, SPI, TWI interrupts at higher levels to reduce latency in communication as much as possible. The AVR ports do not use configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY. Does the rule about not using …FromISR() API functions still apply in this case? What exactly are the dangers of using these functions from a higher-priority-than-tick ISR?
2) Higher level ISR interrupting portSAVE_CONTEXT or portRESTORE_CONTEXT: if the compiler implements its own correct context saving/restoring for ISRs, is there any problem with this? Communication ISR response might be more important than switching tasks.
Thank you for your help, and have a great day!