# Static void Tasks(bool aInit, void \* const aParam) , Question about the content of this function

**URL:** <https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616>\
**Category:** TI C2000\
**Tags:** multi-core, c2000\
**Created:** [October 8, 2025, 1:20pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616 "2025-10-08T13:20:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgartemann](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rgartemann](https://forum.plexim.com/u/rgartemann)\
**Post date:** [October 8, 2025, 1:20pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/1 "2025-10-08T13:20:01Z")

</div>

What is ‘Controller\_CPU0\_errorStatus’ and where can I see its content? How does it behave when the code is in the target MCU (TI2000)? Where is the variable ‘aInit’ used?

---

<div class="post-metadata">

**Author:** ![sullivan](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@sullivan](https://forum.plexim.com/u/sullivan)\
**Post date:** [October 8, 2025, 6:37pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/2 "2025-10-08T18:37:45Z")

</div>

Hello,

The errorStatus is used by our PIL framework for reporting errors back to the user. Essentially, if there is some sort of runtime error, we populate this value with error information. Right now (to my knowledge) our code doesn’t really use this to a meaningful extent.

aInit is used by the dispatcher to enable interrupts to trigger the base task on startup.

---

<div class="post-metadata">

**Author:** ![Beat\_Arnet](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/beat_arnet/32/9_2.png) [@Beat\_Arnet](https://forum.plexim.com/u/Beat_Arnet)\
**Post date:** [October 16, 2025, 2:32pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/3 "2025-10-16T14:32:47Z")

</div>

There are conditions in which the "\_errorStatus” variable is set at runtime.

For example, by Assertion blocks, when they are configured to emit an error.

 ![Screenshot 2025-10-16 at 10.20.56 AM](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/2/20c7f56309728cc090f7688ba6c306f1c47aa67c.png)

The circuit above will cause the model execution to halt and the message configured in the Assertion block will be reported via external mode.

 ![Screenshot 2025-10-16 at 10.21.18 AM](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/2X/1/155fa0ecd4962335ece0be9ff57a4dc7e20101b8.png)

Similarly, assertions related to mathematical operations (e.g., overflows) will be reported by means of this mechanism.

Note that such error conditions can only by cleared by an MCU reset.

---

<div class="post-metadata">

**Author:** ![rgartemann](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rgartemann](https://forum.plexim.com/u/rgartemann)\
**Post date:** [October 16, 2025, 3:59pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/4 "2025-10-16T15:59:12Z")

</div>

Thanks for the quick reply. I find the behaviour in the event of errors interesting. This raises the question for me of what the behaviour is if I am not connected to the hardware in external mode but the software is running independently on the MCU.

---

<div class="post-metadata">

**Author:** ![Beat\_Arnet](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/beat_arnet/32/9_2.png) [@Beat\_Arnet](https://forum.plexim.com/u/Beat_Arnet)\
**Post date:** [October 22, 2025, 8:35pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/5 "2025-10-22T20:35:01Z")

</div>

I would consider such errors more as _exceptions_ that should never happen unless you are actively developing (and connected to PLECS).

When they do occur, the control tasks are no longer executed and all PWM outputs are disabled (provided the model uses a Powerstage Protection block - look for the “PanicCallback” in the generated “\_hal.c” code).

---

<div class="post-metadata">

**Author:** ![rgartemann](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rgartemann](https://forum.plexim.com/u/rgartemann)\
**Post date:** [October 28, 2025, 1:17pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/6 "2025-10-28T13:17:15Z")

</div>

Hello Beat,  
Thanks for pointing that out. We tested it and saw that the area is also affected by the error.  
Since we changed the task cycle from 20KHz to 10 KHz and the error still occurred, it is probably not just a question of the processing time of the Basi task.

void DISPR\_dispatcher()  
.  
.  
.  
if (obj-\>panicOccurred) {  
obj-\>interruptNesting++;  
return;  
}  
.  
.  
.

---

<div class="post-metadata">

**Author:** ![Beat\_Arnet](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/beat_arnet/32/9_2.png) [@Beat\_Arnet](https://forum.plexim.com/u/Beat_Arnet)\
**Post date:** [November 24, 2025, 2:14pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/7 "2025-11-24T14:14:14Z")

</div>

Hello again - Do you need any further clarifications from us?

Just want to make sure I did not drop the ball here!

---

<div class="post-metadata">

**Author:** ![rgartemann](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rgartemann](https://forum.plexim.com/u/rgartemann)\
**Post date:** [November 24, 2025, 2:50pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/8 "2025-11-24T14:50:20Z")

</div>

Hello Beat,  
I am currently in discussion with Sean Sullivan via support ticket #30157. At this point, I do not believe any action is required on this public forum.

---

<div class="post-metadata">

**Author:** ![Beat\_Arnet](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/beat_arnet/32/9_2.png) [@Beat\_Arnet](https://forum.plexim.com/u/Beat_Arnet)\
**Post date:** [November 24, 2025, 6:17pm UTC](https://forum.plexim.com/t/static-void-tasks-bool-ainit-void-const-aparam-question-about-the-content-of-this-function/2616/9 "2025-11-24T18:17:25Z")

</div>

Excellent. Thank you for letting me know.
