# vTaskNotify not working with xTimerPendFunctionCall

**URL:** <https://forums.freertos.org/t/vtasknotify-not-working-with-xtimerpendfunctioncall/17051>\
**Category:** Kernel\
**Created:** [March 27, 2023, 4:25am UTC](https://forums.freertos.org/t/vtasknotify-not-working-with-xtimerpendfunctioncall/17051 "2023-03-27T04:25:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saurav24](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Saurav24](https://forums.freertos.org/u/Saurav24)\
**Post date:** [March 27, 2023, 4:25am UTC](https://forums.freertos.org/t/vtasknotify-not-working-with-xtimerpendfunctioncall/17051/1 "2023-03-27T04:25:26Z")

</div>

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

```auto
/* 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

```auto
/* 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.

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [March 27, 2023, 5:30am UTC](https://forums.freertos.org/t/vtasknotify-not-working-with-xtimerpendfunctioncall/17051/2 "2023-03-27T05:30:50Z")

</div>

Is it possible that `vHandlingTask` is getting starved? Can you put a breakpoint at `prvReceivePacket`and see if it `vHandlingTask` is in ready state?

Also, you should call `portYIELD_FROM_ISR` in the ISR.
