# HardFault randomly in xEventGroupWaitBits

**URL:** <https://forums.freertos.org/t/hardfault-randomly-in-xeventgroupwaitbits/21567>\
**Category:** Kernel\
**Created:** [October 3, 2024, 11:23am UTC](https://forums.freertos.org/t/hardfault-randomly-in-xeventgroupwaitbits/21567 "2024-10-03T11:23:14Z")\
**Posts on this page:** 1\
**Showing post:** 20

<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:** [October 4, 2024, 7:45am UTC](https://forums.freertos.org/t/hardfault-randomly-in-xeventgroupwaitbits/21567/20 "2024-10-04T07:45:58Z")

</div>

NVIC interrupt priorities 5…15 (higher value means lower prio on Cortex-M) are allowed resp. covered by FreeRTOS means you can use FreeRTOS API calls in the corresponding ISRs.  
The TIM6 interrupt handler should not use FreeRTOS-API and probably doesn’t.  
If you’re using default SysTick for FreeRTOS tick you don’t need to care. FreeRTOS handles this for you (and set the prio to configKERNEL\_INTERRUPT\_PRIORITY).  
See also this posting for a pretty good explanation:

> [@Understanding priority levels of ISR and FreeRTOS APIs](https://forums.freertos.org/t/understanding-priority-levels-of-isr-and-freertos-apis/10453/16):
>
> A pictorial representation, if that helps: Logical Numerical Priorities Priorities +--------+ +-------+ ^ | | | | | | | | | | | | | | | Not masked by FreeRTOS kernel | Higher | | Lower | | ( FreeRTOS APIs can not be | | | | | called from these ISRs. ) …

---

_[View the full topic](https://forums.freertos.org/t/hardfault-randomly-in-xeventgroupwaitbits/21567)._
