vTaskSuspend()

I am working with STM32 and GCC. My program have several tasks which communicate with two Queues, a Counting Semaphore and a Mutex. For debugging, I have implemented some of the Trace Hook Macros. If I do a xQueueReceive(RxQueue, &value, portMAX_DELAY) to an empty queue, I see that the traceTASK_SUSPEND() macro is active in the actual running task and  that this task is restarted at the beginning again. Is this possible / correct ?

vTaskSuspend()

I can understand that this would be unexpected, but it is actually correct. When a task wants to block indefinitely it is actually placed onto the suspended list rather than a blocked list – this is because tasks on the blocked list must have a timeout.  Even thought the suspended list is used, the task is in the Blocked state not the Suspended state. Regards.

vTaskSuspend()

With your explanation the program is now running. The problem was, that I have taken a Mutex and later I was receiving characters with xQueueReceive(RxQueue, &value, portMAX_DELAY) in the same task. Because the queue was still waiting of more values, the task was suspended and the mutex was lost forever. Perhaps you can add this hint to your FreeRTOS eBook. Thanks, Klaus.

vTaskSuspend()

With your explanation the program is now running. The problem was, that I have taken a Mutex and later I was receiving characters with xQueueReceive(RxQueue, &value, portMAX_DELAY) in the same task. Because the queue was still waiting of more values, the task was suspended and the mutex was lost forever. Perhaps you can add this hint to your FreeRTOS eBook. Thanks, Klaus.