TaskSuspend and Resume

delphes wrote on Monday, August 06, 2018:

Dear All,

Using Cortex M4 (STM32L4) with Freertos 9.0, I would like to suspend a running task and resume, however my task is doing somethings like this :

While (true)
Waiting event 1
Process 1
Process 2
Process 3
etc

If task is suspended during Process 2 , How It can resume and go to Waiting Event1 instead of continuing to process3 ?

Thanks and Rgds
David

rtel wrote on Monday, August 06, 2018:

Suspending and resuming does not pass any information to the task, so the task will continue from the point at which it was suspended. If you want the program flow to change you would need to use a different mechanism, such as setting an event but to indicate the task should take an action - but even the the task would have to manually check the bits.

delphes wrote on Tuesday, August 07, 2018:

Thanks Richard, I will think about changing architecture