Harmony ISR and FreeRTOS Deferred Interrupt Processing Issue
Hi all
I'm trying to implement a simple deferred interrupt processing example by using a FreeRTOS Direct to Task Notification. The basic outline I'm trying to use is Example 2.
freertos.org/RTOS_Task_Notification_As_Counting_Semaphore.html
I've created a timer with an alarm interval using Harmony (including the assembly wrapper) with INT_PRIORITY_LEVEL3. The interrupt fires as expected.
void IntHandlerDrvTmrInstance0(void)
{
DRV_TMR_Tasks(sysObj.drvTmr0);
BaseType_t xHigherPriorityTaskWoken = pdFALSE; /* Initialised to pdFALSE. */
configASSERT( xStreaming_TimerHandlerTask != NULL );
vTaskNotifyGiveFromISR( xStreaming_TimerHandlerTask, &xHigherPriorityTaskWoken );
portEND_SWITCHING_ISR(xHigherPriorityTaskWoken);
}
I can step through and view that the task gets unblocked and set to the ready state (after vTaskNotifyGiveFromISR executes).
However, the RTOS never switches into the xStreaming_TimerHandlerTask (which has a higher priority at 2, than the other tasks which are priority 1). It keeps executing the lower priority tasks like nothing ever happened! Ultimately, the task gets blocked by something and unblocked again during the ISR but never executes.
I can't tell if the problem has to do with interrupt priorities, task priorities, or maybe the assembly wrapper Harmony adds to ISRs?
For reference:
#define configKERNEL_INTERRUPT_PRIORITY 1
configMAX_SYSCALL_INTERRUPT_PRIORITY 3
If anyone has any insight, I'd greatly appreciate it!
post edited by clange - 2020/06/05 16:19:37