# suspend task

**URL:** <https://forums.freertos.org/t/suspend-task/3973>\
**Category:** Kernel\
**Created:** [February 9, 2012, 9:00am UTC](https://forums.freertos.org/t/suspend-task/3973 "2012-02-09T09:00:36Z")\
**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:** [February 9, 2012, 9:00am UTC](https://forums.freertos.org/t/suspend-task/3973/1 "2012-02-09T09:00:36Z")

</div>

**[malacay](https://sourceforge.net/u/malacay/)** wrote on [Thursday, February 09, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/b2051bc7/#ef5a):

Hello,

if have a Problem when i suspend more tasks. I work on IAR, EFM32G290F128.

Task1()Priority:3  
{  
\_\_\_xTaskCreate(Taks2,…);  
\_\_\_xTaskCreate(Taks3,…);  
vTaskSuspend( Task1 );  
…  
}

Task2()Priority:2  
{  
\_\_\_xTaskCreate(Taks4,…);  
vTaskSuspend( Task2 );  
…  
vTaskResume(Task1);  
….  
}

Task3()Priority:2  
{  
\_\_\_xTaskCreate(Taks5,…);  
vTaskSuspend( Task3 );  
…

vTaskResume(Task1);  
…  
}

Task4()Priority:1  
{  
…  
vTaskResume(Task2);  
…  
}  
Task5()Priority:1  
{  
…  
vTaskResume(Task3);  
}

When I goto vTaskSuspend( Task3 ); then it goes no further.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 9, 2012, 9:27am UTC](https://forums.freertos.org/t/suspend-task/3973/2 "2012-02-09T09:27:57Z")

</div>

**[malacay](https://sourceforge.net/u/malacay/)** wrote on [Thursday, February 09, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/b2051bc7/#ba2a):

When I goto vTaskSuspend( Task3 ); then it goes no further, because Task4 and Task5 are not generated.

Why?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 9, 2012, 10:03am UTC](https://forums.freertos.org/t/suspend-task/3973/3 "2012-02-09T10:03:25Z")

</div>

**[malacay](https://sourceforge.net/u/malacay/)** wrote on [Thursday, February 09, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/b2051bc7/#81a2):

Ok now I gernerate Task4 und Task5 but now when i goto vTaskSuspend( Task3 ) it stopped

---

<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:** [February 9, 2012, 10:33am UTC](https://forums.freertos.org/t/suspend-task/3973/4 "2012-02-09T10:33:22Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Thursday, February 09, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/b2051bc7/#b3cf):

This is an immensely complex scenario that I don’t want to work through, but even if I did there is no way I could possibly tell which task would run when without knowing their priorities.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [February 9, 2012, 11:20am UTC](https://forums.freertos.org/t/suspend-task/3973/5 "2012-02-09T11:20:07Z")

</div>

**[malacay](https://sourceforge.net/u/malacay/)** wrote on [Thursday, February 09, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/b2051bc7/#9cf2):

The priorities are:  
Task1 -\>3  
Task2 -\>2  
Task3 -\>2  
Task4 -\>1  
Task5 -\>1

Task2 and Task3 are periodic tasks. Tasks2 Periode-\>100ms, Tasks3 Periode-\>50ms  
Task4 and Task5 will generate and after they are ready they delete themselves.  
Task1 ist active when Task2 and Task3 are in blocked state.
