I have read in multiple area that FreeRTOS calls with “FromISR” should be called with-in an ISR. I have also seen threads where users are specifically told not to use “portENTER_CRITICAL” with-in and ISR, these threads always refer to the ARM Cortex port.
I have been surrounding all my calls with-in ISR as follows:
portENTER_CRITICAL(); xSemaphoreGiveFromISR( m_TransmitMobSemaphore, &xHigherPriorityTaskWoken ); portEXIT_CRITICAL();
Now i am having an intermitted problem and trying to track it down. Not sure if Stack, or interrupts at the moment. But re-reading the manual and the forums i have found that i may well have made a mistake by using “portENTER_CRITICAL();” with-in interrupts.
Now the question is:
vTick() in port.c which is provided with the AVR32 port FreeRTOS V7.0.0 does the following
/* Because FreeRTOS is not supposed to run with nested interrupts, put all OS calls in a critical section . */ portENTER_CRITICAL(); vTaskIncrementTick(); portEXIT_CRITICAL();
Is that a mistake? is this a special case? Should i leave all my portENTER_CRITICAL(); in my ISR’s?