Hello, i am working on ethernet module, i was doing some modification in my code and i got some doubts.
below is external interrupt handler
/* ISR */
void
EXTI2_IRQHandler (void)
{
GPIO_write_pin (7, 0);
//volatile BaseType_t xHigherPriorityTaskWoken = pdFALSE;
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if (enc28j60_rcr(EIR) == 0x48) {
xTimerPendFunctionCallFromISR( prvReceivePacket,
NULL,
( uint32_t )0,
&xHigherPriorityTaskWoken );
//GPIO_read_pin(7);
vTaskNotifyGiveFromISR(pxCreatedTaskISR, &xHigherPriorityTaskWoken);
}
//portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
/* If xHigherPriorityTaskWoken is now set to pdTRUE then a context switch
should be performed to ensure the interrupt returns directly to the highest
priority task. The macro used for this purpose is dependent on the port in
use and may be called portEND_SWITCHING_ISR(). */
}
and below is task which i have created
/* Repetitive task. */
void
vHandlingTask (void *pvParameters)
{
//uint32_t ulInterruptStatus = 0;
while(1)
{
ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
GPIO_read_pin(7);
}
}
problem is if i use “xTimerPendFunctionCallFromISR” from ISR then vTaskNotifyGiveFromISR is not working, why it is happening?? if anyone have some idea about it please share your views.