# uxTaskGetSystemState() configAsserts from vApplicationStackOverflowHook() and HardFaultHandler()

**URL:** <https://forums.freertos.org/t/uxtaskgetsystemstate-configasserts-from-vapplicationstackoverflowhook-and-hardfaulthandler/2691>\
**Category:** Kernel\
**Created:** [December 1, 2015, 7:33pm UTC](https://forums.freertos.org/t/uxtaskgetsystemstate-configasserts-from-vapplicationstackoverflowhook-and-hardfaulthandler/2691 "2015-12-01T19:33:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 1, 2015, 7:33pm UTC](https://forums.freertos.org/t/uxtaskgetsystemstate-configasserts-from-vapplicationstackoverflowhook-and-hardfaulthandler/2691/1 "2015-12-01T19:33:01Z")

</div>

**[chuck-heller](https://sourceforge.net/u/chuck-heller/)** wrote on [Tuesday, December 01, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/7802eb43/#d4e0):

I was hoping to call uxTaskGetSystemState() from my stack overflow and hard fault functions, but I get a configAssert().  
Near the bottom of uxTaskGetSystemState(), there is a call to xTaskResumeAll(), and taskENTER\_CRITICAL() calls vPortEnterCritical(), which asserts because we are in an interrupt context.

uxTaskGetSystemState() is a great function! I was hoping to use it for more troubleshooting information when I had a fault or bug.

Thanks for any help!

FreeRTOS 8.2.3  
Atmel SAM4S from IAR.

-Chuck Heller

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 1, 2015, 7:43pm UTC](https://forums.freertos.org/t/uxtaskgetsystemstate-configasserts-from-vapplicationstackoverflowhook-and-hardfaulthandler/2691/2 "2015-12-01T19:43:13Z")

</div>

**[edwards3](https://sourceforge.net/u/edwards3/)** wrote on [Tuesday, December 01, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/7802eb43/#f4ed):

As you are using IAR you can get similar information from the FreeRTOS plugin that is included in the tool as standard. Look at the projects debug options to enable.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 1, 2015, 8:09pm UTC](https://forums.freertos.org/t/uxtaskgetsystemstate-configasserts-from-vapplicationstackoverflowhook-and-hardfaulthandler/2691/3 "2015-12-01T20:09:13Z")

</div>

**[chuck-heller](https://sourceforge.net/u/chuck-heller/)** wrote on [Tuesday, December 01, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/7802eb43/#f4ed/b32c):

Thanks, yes, we use those tools in IAR, but we also would like the information from any field units that are giving us trouble, and so IAR would not always be available.  
-Chuck Heller

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [December 1, 2015, 10:00pm UTC](https://forums.freertos.org/t/uxtaskgetsystemstate-configasserts-from-vapplicationstackoverflowhook-and-hardfaulthandler/2691/4 "2015-12-01T22:00:27Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, December 01, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/7802eb43/#fbf0):

The assert is correct, it is not good to call that from an interrupt, but in your case it has crashed already (you are not trying to return from the fault handler, just print diagnostic information), so it would be ok to remove the assert, or ignore it.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 1, 2015, 11:08pm UTC](https://forums.freertos.org/t/uxtaskgetsystemstate-configasserts-from-vapplicationstackoverflowhook-and-hardfaulthandler/2691/5 "2015-12-01T23:08:25Z")

</div>

**[chuck-heller](https://sourceforge.net/u/chuck-heller/)** wrote on [Tuesday, December 01, 2015](https://sourceforge.net/p/freertos/discussion/382005/thread/7802eb43/#fbf0/9648):

OK, thanks.
