I’m currently using FreeRTOS on Atmel’s AVR32 UC3 Serieas and am trying to resume a task from an ISR. Here is my ISR:
static void dataready_int_handler(void)
portBASE_TYPE xYieldRequired = pdFALSE;
//Tell the processing task to start
xYieldRequired = xTaskResumeFromISR( xQuantumHandle );
This code gets to the switch context once, and then on every subsequent call of xTaskResumeFromISR, it says no context switch is necessary because prvIsTaskSuspended says xQuantumHandle is not suspended (but I’m quite sure it’s not running, and there is always one item in the xSuspendedTaskList).
The suspicious code is in prvIsTaskSuspended:
/* Is the task we are attempting to resume actually in the
suspended list? */
if( listIS_CONTAINED_WITHIN( &xSuspendedTaskList, &( pxTCB->xGenericListItem ) ) != pdFALSE )
/* Has the task already been resumed from within an ISR? */
if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) != pdTRUE )
It gets past the first check that the task is in the suspended list, but after this pxTCB changes to 0x00. Any thoughts on what might cause this or something I could be doing wrong?