BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if (gpfIsr) {
gpfIsr();
}
IFS0CLR = _IFS0_INT4IF_MASK;
if (gpfIsr) {
vTaskNotifyGiveFromISR(xNetworkTaskHandle, &xHigherPriorityTaskWoken);
}
}
~~~
The task looks like
~~~
//Priority 2
void NetworkTasks(void){
while(1){
ulTaskNotifyTake(pdTRUE, 10 / portTICKPERIODMS);
(void) xSemaphoreTake(HifMutex, portMAXDELAY);
m2mwifihandleevents(NULL);
(void) xSemaphoreGive(HifMutex);
}} ~~~ I am trying to understand why there is a 0.5ms delay in a trace capture before the network task is switched to. I’m not sure how to ask this question exactly, so I’ll post the traces, see at 7.58.226.534 vTaskNotiveGiveFromISR(Network) where the isr fires, then the context switches to idle, then there are a number of Actor Readys with a delay I don’t understand, and Network doesn’t get switched to until 7.58.227.015. So I’m trying to understand what FreeRTOS and or the CPU is doing in this time, and wondering how I can get this to switch quicker? aercon.net/Public/trace.bin