**nobody** wrote on Wednesday, February 22, 2006:

I’m trying to use the vTaskDelayUntil :

I have 3 tasks

- task 1 : priority 1 and it is resuming task 2

- task 2 : priority 2 and it is itself suspending

- task 3 : using vTaskDelayUntil like in FreeRTOS example

and it is scheduling like this

task 3 wake up + sleeping

task 2

task 1

task 2

task 1

task 2

task 3 wake up by timer + sleeping

task 1

task 1

…

task 3 wake up by timer + sleeping

task IDLE …

I don’t understand why it is 'killing" the other task : the value of uxNumberOfItems for the

pxReadyTasksLists[2] & [3] became 0 ???

task 3 is priority 3 and task 1 is my low priority task in which there is always something to do

static void task1( void *pvParameters )

{

( void ) pvParameters;

for( ;; )

{

//there is always something : polling + TaskResume(Task2) so pxReadyTasksLists[1].uxNumberOfItems must be always 1

}

}

static void task2( void *pvParameters )

{

( void ) pvParameters;

for( ;; )

{

//code + TaskSuspend(NULL)

}

}

static void task3( void *pvParameters )

{

portTickType xDelayPeriod = 100;

portTickType xLastWakeTime;

( void ) pvParameters;

xLastWakeTime = xTaskGetTickCount();

for( ;; )

{

vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );

//code

}

}

I understand pxReadyTasksLists[2].uxNumberOfItems can be 0 because I’m suspending it but for the task1 it must be always 1 but in my case this task is not working anymore as I wrote before.