# Can't xSemaphoreGiveFromISR() during HW timer - polling task faster than FreeRTOS tick allows

**URL:** <https://forums.freertos.org/t/cant-xsemaphoregivefromisr-during-hw-timer-polling-task-faster-than-freertos-tick-allows/14034>\
**Category:** Kernel\
**Tags:** debug\
**Created:** [December 8, 2021, 12:08pm UTC](https://forums.freertos.org/t/cant-xsemaphoregivefromisr-during-hw-timer-polling-task-faster-than-freertos-tick-allows/14034 "2021-12-08T12:08:57Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [December 15, 2021, 11:47am UTC](https://forums.freertos.org/t/cant-xsemaphoregivefromisr-during-hw-timer-polling-task-faster-than-freertos-tick-allows/14034/19 "2021-12-15T11:47:09Z")

</div>

> [@D\_TTSA](#):
>
> - What interrupt priority does the FreeRTOS tick handler have?

Usually the lowest prio. See `configKERNEL_INTERRUPT_PRIORITY` in `FreeRTOSConfig.h`

> [@D\_TTSA](#):
>
> - What happens if a FreeRTOS tick occurs while we are busy with another IRQ handler?

It’s delayed/kept pending given it has the lowest interrupt prio.

You could/should set your non-FreeRTOS GPT2 interrupt to a (logically) prio \>= `configMAX_SYSCALL_INTERRUPT_PRIORITY +1` if you want to avoid any interference with the FreeRTOS part (interrupts/critical sections) of your application.  
Then and with nested interrupts enabled (default) your GPT2 interrupt will interrupt any other running ISR of an interrupt with a logically lower prio.

---

_[View the full topic](https://forums.freertos.org/t/cant-xsemaphoregivefromisr-during-hw-timer-polling-task-faster-than-freertos-tick-allows/14034)._
